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/SnapshotService.go
NewRevertToVMSnapshotParams
func (s *SnapshotService) NewRevertToVMSnapshotParams(vmsnapshotid string) *RevertToVMSnapshotParams { p := &RevertToVMSnapshotParams{} p.p = make(map[string]interface{}) p.p["vmsnapshotid"] = vmsnapshotid return p }
go
func (s *SnapshotService) NewRevertToVMSnapshotParams(vmsnapshotid string) *RevertToVMSnapshotParams { p := &RevertToVMSnapshotParams{} p.p = make(map[string]interface{}) p.p["vmsnapshotid"] = vmsnapshotid return p }
[ "func", "(", "s", "*", "SnapshotService", ")", "NewRevertToVMSnapshotParams", "(", "vmsnapshotid", "string", ")", "*", "RevertToVMSnapshotParams", "{", "p", ":=", "&", "RevertToVMSnapshotParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "vmsnapshotid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new RevertToVMSnapshotParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "RevertToVMSnapshotParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L1533-L1538
train
xanzy/go-cloudstack
cloudstack/SnapshotService.go
RevertToVMSnapshot
func (s *SnapshotService) RevertToVMSnapshot(p *RevertToVMSnapshotParams) (*RevertToVMSnapshotResponse, error) { resp, err := s.cs.newRequest("revertToVMSnapshot", p.toURLValues()) if err != nil { return nil, err } var r RevertToVMSnapshotResponse 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 *SnapshotService) RevertToVMSnapshot(p *RevertToVMSnapshotParams) (*RevertToVMSnapshotResponse, error) { resp, err := s.cs.newRequest("revertToVMSnapshot", p.toURLValues()) if err != nil { return nil, err } var r RevertToVMSnapshotResponse 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", "*", "SnapshotService", ")", "RevertToVMSnapshot", "(", "p", "*", "RevertToVMSnapshotParams", ")", "(", "*", "RevertToVMSnapshotResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "RevertToVMSnapshotResponse", "\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", "}" ]
// Revert VM from a vmsnapshot.
[ "Revert", "VM", "from", "a", "vmsnapshot", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L1541-L1573
train
xanzy/go-cloudstack
cloudstack/SnapshotService.go
NewUpdateSnapshotPolicyParams
func (s *SnapshotService) NewUpdateSnapshotPolicyParams() *UpdateSnapshotPolicyParams { p := &UpdateSnapshotPolicyParams{} p.p = make(map[string]interface{}) return p }
go
func (s *SnapshotService) NewUpdateSnapshotPolicyParams() *UpdateSnapshotPolicyParams { p := &UpdateSnapshotPolicyParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "SnapshotService", ")", "NewUpdateSnapshotPolicyParams", "(", ")", "*", "UpdateSnapshotPolicyParams", "{", "p", ":=", "&", "UpdateSnapshotPolicyParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UpdateSnapshotPolicyParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateSnapshotPolicyParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L1731-L1735
train
xanzy/go-cloudstack
cloudstack/SnapshotService.go
UpdateSnapshotPolicy
func (s *SnapshotService) UpdateSnapshotPolicy(p *UpdateSnapshotPolicyParams) (*UpdateSnapshotPolicyResponse, error) { resp, err := s.cs.newRequest("updateSnapshotPolicy", p.toURLValues()) if err != nil { return nil, err } var r UpdateSnapshotPolicyResponse 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 *SnapshotService) UpdateSnapshotPolicy(p *UpdateSnapshotPolicyParams) (*UpdateSnapshotPolicyResponse, error) { resp, err := s.cs.newRequest("updateSnapshotPolicy", p.toURLValues()) if err != nil { return nil, err } var r UpdateSnapshotPolicyResponse 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", "*", "SnapshotService", ")", "UpdateSnapshotPolicy", "(", "p", "*", "UpdateSnapshotPolicyParams", ")", "(", "*", "UpdateSnapshotPolicyResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateSnapshotPolicyResponse", "\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 the snapshot policy.
[ "Updates", "the", "snapshot", "policy", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L1738-L1770
train
xanzy/go-cloudstack
cloudstack/NicService.go
NewAddIpToNicParams
func (s *NicService) NewAddIpToNicParams(nicid string) *AddIpToNicParams { p := &AddIpToNicParams{} p.p = make(map[string]interface{}) p.p["nicid"] = nicid return p }
go
func (s *NicService) NewAddIpToNicParams(nicid string) *AddIpToNicParams { p := &AddIpToNicParams{} p.p = make(map[string]interface{}) p.p["nicid"] = nicid return p }
[ "func", "(", "s", "*", "NicService", ")", "NewAddIpToNicParams", "(", "nicid", "string", ")", "*", "AddIpToNicParams", "{", "p", ":=", "&", "AddIpToNicParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "nicid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AddIpToNicParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddIpToNicParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NicService.go#L61-L66
train
xanzy/go-cloudstack
cloudstack/NicService.go
AddIpToNic
func (s *NicService) AddIpToNic(p *AddIpToNicParams) (*AddIpToNicResponse, error) { resp, err := s.cs.newRequest("addIpToNic", p.toURLValues()) if err != nil { return nil, err } var r AddIpToNicResponse 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 *NicService) AddIpToNic(p *AddIpToNicParams) (*AddIpToNicResponse, error) { resp, err := s.cs.newRequest("addIpToNic", p.toURLValues()) if err != nil { return nil, err } var r AddIpToNicResponse 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", "*", "NicService", ")", "AddIpToNic", "(", "p", "*", "AddIpToNicParams", ")", "(", "*", "AddIpToNicResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "AddIpToNicResponse", "\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", "}" ]
// Assigns secondary IP to NIC
[ "Assigns", "secondary", "IP", "to", "NIC" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NicService.go#L69-L101
train
xanzy/go-cloudstack
cloudstack/NicService.go
NewListNicsParams
func (s *NicService) NewListNicsParams(virtualmachineid string) *ListNicsParams { p := &ListNicsParams{} p.p = make(map[string]interface{}) p.p["virtualmachineid"] = virtualmachineid return p }
go
func (s *NicService) NewListNicsParams(virtualmachineid string) *ListNicsParams { p := &ListNicsParams{} p.p = make(map[string]interface{}) p.p["virtualmachineid"] = virtualmachineid return p }
[ "func", "(", "s", "*", "NicService", ")", "NewListNicsParams", "(", "virtualmachineid", "string", ")", "*", "ListNicsParams", "{", "p", ":=", "&", "ListNicsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "virtualmachineid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListNicsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListNicsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NicService.go#L210-L215
train
xanzy/go-cloudstack
cloudstack/NicService.go
ListNics
func (s *NicService) ListNics(p *ListNicsParams) (*ListNicsResponse, error) { resp, err := s.cs.newRequest("listNics", p.toURLValues()) if err != nil { return nil, err } var r ListNicsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *NicService) ListNics(p *ListNicsParams) (*ListNicsResponse, error) { resp, err := s.cs.newRequest("listNics", p.toURLValues()) if err != nil { return nil, err } var r ListNicsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "NicService", ")", "ListNics", "(", "p", "*", "ListNicsParams", ")", "(", "*", "ListNicsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListNicsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// list the vm nics IP to NIC
[ "list", "the", "vm", "nics", "IP", "to", "NIC" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NicService.go#L218-L230
train
xanzy/go-cloudstack
cloudstack/NicService.go
NewRemoveIpFromNicParams
func (s *NicService) NewRemoveIpFromNicParams(id string) *RemoveIpFromNicParams { p := &RemoveIpFromNicParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *NicService) NewRemoveIpFromNicParams(id string) *RemoveIpFromNicParams { p := &RemoveIpFromNicParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "NicService", ")", "NewRemoveIpFromNicParams", "(", "id", "string", ")", "*", "RemoveIpFromNicParams", "{", "p", ":=", "&", "RemoveIpFromNicParams", "{", "}", "\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 RemoveIpFromNicParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "RemoveIpFromNicParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NicService.go#L289-L294
train
xanzy/go-cloudstack
cloudstack/NicService.go
RemoveIpFromNic
func (s *NicService) RemoveIpFromNic(p *RemoveIpFromNicParams) (*RemoveIpFromNicResponse, error) { resp, err := s.cs.newRequest("removeIpFromNic", p.toURLValues()) if err != nil { return nil, err } var r RemoveIpFromNicResponse 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 *NicService) RemoveIpFromNic(p *RemoveIpFromNicParams) (*RemoveIpFromNicResponse, error) { resp, err := s.cs.newRequest("removeIpFromNic", p.toURLValues()) if err != nil { return nil, err } var r RemoveIpFromNicResponse 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", "*", "NicService", ")", "RemoveIpFromNic", "(", "p", "*", "RemoveIpFromNicParams", ")", "(", "*", "RemoveIpFromNicResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "RemoveIpFromNicResponse", "\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 secondary IP from the NIC.
[ "Removes", "secondary", "IP", "from", "the", "NIC", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NicService.go#L297-L324
train
xanzy/go-cloudstack
cloudstack/NicService.go
NewUpdateVmNicIpParams
func (s *NicService) NewUpdateVmNicIpParams(nicid string) *UpdateVmNicIpParams { p := &UpdateVmNicIpParams{} p.p = make(map[string]interface{}) p.p["nicid"] = nicid return p }
go
func (s *NicService) NewUpdateVmNicIpParams(nicid string) *UpdateVmNicIpParams { p := &UpdateVmNicIpParams{} p.p = make(map[string]interface{}) p.p["nicid"] = nicid return p }
[ "func", "(", "s", "*", "NicService", ")", "NewUpdateVmNicIpParams", "(", "nicid", "string", ")", "*", "UpdateVmNicIpParams", "{", "p", ":=", "&", "UpdateVmNicIpParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "nicid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UpdateVmNicIpParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateVmNicIpParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NicService.go#L368-L373
train
xanzy/go-cloudstack
cloudstack/NicService.go
UpdateVmNicIp
func (s *NicService) UpdateVmNicIp(p *UpdateVmNicIpParams) (*UpdateVmNicIpResponse, error) { resp, err := s.cs.newRequest("updateVmNicIp", p.toURLValues()) if err != nil { return nil, err } var r UpdateVmNicIpResponse 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 *NicService) UpdateVmNicIp(p *UpdateVmNicIpParams) (*UpdateVmNicIpResponse, error) { resp, err := s.cs.newRequest("updateVmNicIp", p.toURLValues()) if err != nil { return nil, err } var r UpdateVmNicIpResponse 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", "*", "NicService", ")", "UpdateVmNicIp", "(", "p", "*", "UpdateVmNicIpParams", ")", "(", "*", "UpdateVmNicIpResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateVmNicIpResponse", "\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", "}" ]
// Update the default Ip of a VM Nic
[ "Update", "the", "default", "Ip", "of", "a", "VM", "Nic" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NicService.go#L376-L408
train
xanzy/go-cloudstack
cloudstack/UserService.go
NewCreateUserParams
func (s *UserService) NewCreateUserParams(account string, email string, firstname string, lastname string, password string, username string) *CreateUserParams { p := &CreateUserParams{} p.p = make(map[string]interface{}) p.p["account"] = account p.p["email"] = email p.p["firstname"] = firstname p.p["lastname"] = lastname p.p["password"] = password p.p["username"] = username return p }
go
func (s *UserService) NewCreateUserParams(account string, email string, firstname string, lastname string, password string, username string) *CreateUserParams { p := &CreateUserParams{} p.p = make(map[string]interface{}) p.p["account"] = account p.p["email"] = email p.p["firstname"] = firstname p.p["lastname"] = lastname p.p["password"] = password p.p["username"] = username return p }
[ "func", "(", "s", "*", "UserService", ")", "NewCreateUserParams", "(", "account", "string", ",", "email", "string", ",", "firstname", "string", ",", "lastname", "string", ",", "password", "string", ",", "username", "string", ")", "*", "CreateUserParams", "{", "p", ":=", "&", "CreateUserParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "account", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "email", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "firstname", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "lastname", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "password", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "username", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateUserParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateUserParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UserService.go#L140-L150
train
xanzy/go-cloudstack
cloudstack/UserService.go
NewDeleteUserParams
func (s *UserService) NewDeleteUserParams(id string) *DeleteUserParams { p := &DeleteUserParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *UserService) NewDeleteUserParams(id string) *DeleteUserParams { p := &DeleteUserParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "UserService", ")", "NewDeleteUserParams", "(", "id", "string", ")", "*", "DeleteUserParams", "{", "p", ":=", "&", "DeleteUserParams", "{", "}", "\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 DeleteUserParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteUserParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UserService.go#L220-L225
train
xanzy/go-cloudstack
cloudstack/UserService.go
NewDisableUserParams
func (s *UserService) NewDisableUserParams(id string) *DisableUserParams { p := &DisableUserParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *UserService) NewDisableUserParams(id string) *DisableUserParams { p := &DisableUserParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "UserService", ")", "NewDisableUserParams", "(", "id", "string", ")", "*", "DisableUserParams", "{", "p", ":=", "&", "DisableUserParams", "{", "}", "\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 DisableUserParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DisableUserParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UserService.go#L291-L296
train
xanzy/go-cloudstack
cloudstack/UserService.go
NewEnableUserParams
func (s *UserService) NewEnableUserParams(id string) *EnableUserParams { p := &EnableUserParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *UserService) NewEnableUserParams(id string) *EnableUserParams { p := &EnableUserParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "UserService", ")", "NewEnableUserParams", "(", "id", "string", ")", "*", "EnableUserParams", "{", "p", ":=", "&", "EnableUserParams", "{", "}", "\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 EnableUserParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "EnableUserParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UserService.go#L383-L388
train
xanzy/go-cloudstack
cloudstack/UserService.go
NewGetUserParams
func (s *UserService) NewGetUserParams(userapikey string) *GetUserParams { p := &GetUserParams{} p.p = make(map[string]interface{}) p.p["userapikey"] = userapikey return p }
go
func (s *UserService) NewGetUserParams(userapikey string) *GetUserParams { p := &GetUserParams{} p.p = make(map[string]interface{}) p.p["userapikey"] = userapikey return p }
[ "func", "(", "s", "*", "UserService", ")", "NewGetUserParams", "(", "userapikey", "string", ")", "*", "GetUserParams", "{", "p", ":=", "&", "GetUserParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "userapikey", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new GetUserParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "GetUserParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UserService.go#L454-L459
train
xanzy/go-cloudstack
cloudstack/UserService.go
NewGetVirtualMachineUserDataParams
func (s *UserService) NewGetVirtualMachineUserDataParams(virtualmachineid string) *GetVirtualMachineUserDataParams { p := &GetVirtualMachineUserDataParams{} p.p = make(map[string]interface{}) p.p["virtualmachineid"] = virtualmachineid return p }
go
func (s *UserService) NewGetVirtualMachineUserDataParams(virtualmachineid string) *GetVirtualMachineUserDataParams { p := &GetVirtualMachineUserDataParams{} p.p = make(map[string]interface{}) p.p["virtualmachineid"] = virtualmachineid return p }
[ "func", "(", "s", "*", "UserService", ")", "NewGetVirtualMachineUserDataParams", "(", "virtualmachineid", "string", ")", "*", "GetVirtualMachineUserDataParams", "{", "p", ":=", "&", "GetVirtualMachineUserDataParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "virtualmachineid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new GetVirtualMachineUserDataParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "GetVirtualMachineUserDataParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UserService.go#L525-L530
train
xanzy/go-cloudstack
cloudstack/UserService.go
NewListUsersParams
func (s *UserService) NewListUsersParams() *ListUsersParams { p := &ListUsersParams{} p.p = make(map[string]interface{}) return p }
go
func (s *UserService) NewListUsersParams() *ListUsersParams { p := &ListUsersParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "UserService", ")", "NewListUsersParams", "(", ")", "*", "ListUsersParams", "{", "p", ":=", "&", "ListUsersParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListUsersParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListUsersParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UserService.go#L692-L696
train
xanzy/go-cloudstack
cloudstack/UserService.go
NewLockUserParams
func (s *UserService) NewLockUserParams(id string) *LockUserParams { p := &LockUserParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *UserService) NewLockUserParams(id string) *LockUserParams { p := &LockUserParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "UserService", ")", "NewLockUserParams", "(", "id", "string", ")", "*", "LockUserParams", "{", "p", ":=", "&", "LockUserParams", "{", "}", "\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 LockUserParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "LockUserParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UserService.go#L800-L805
train
xanzy/go-cloudstack
cloudstack/UserService.go
NewRegisterUserKeysParams
func (s *UserService) NewRegisterUserKeysParams(id string) *RegisterUserKeysParams { p := &RegisterUserKeysParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *UserService) NewRegisterUserKeysParams(id string) *RegisterUserKeysParams { p := &RegisterUserKeysParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "UserService", ")", "NewRegisterUserKeysParams", "(", "id", "string", ")", "*", "RegisterUserKeysParams", "{", "p", ":=", "&", "RegisterUserKeysParams", "{", "}", "\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 RegisterUserKeysParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "RegisterUserKeysParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UserService.go#L871-L876
train
xanzy/go-cloudstack
cloudstack/UserService.go
NewUpdateUserParams
func (s *UserService) NewUpdateUserParams(id string) *UpdateUserParams { p := &UpdateUserParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *UserService) NewUpdateUserParams(id string) *UpdateUserParams { p := &UpdateUserParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "UserService", ")", "NewUpdateUserParams", "(", "id", "string", ")", "*", "UpdateUserParams", "{", "p", ":=", "&", "UpdateUserParams", "{", "}", "\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 UpdateUserParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateUserParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UserService.go#L1015-L1020
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewAddBaremetalHostParams
func (s *HostService) NewAddBaremetalHostParams(hypervisor string, password string, podid string, url string, username string, zoneid string) *AddBaremetalHostParams { p := &AddBaremetalHostParams{} p.p = make(map[string]interface{}) p.p["hypervisor"] = hypervisor p.p["password"] = password p.p["podid"] = podid p.p["url"] = url p.p["username"] = username p.p["zoneid"] = zoneid return p }
go
func (s *HostService) NewAddBaremetalHostParams(hypervisor string, password string, podid string, url string, username string, zoneid string) *AddBaremetalHostParams { p := &AddBaremetalHostParams{} p.p = make(map[string]interface{}) p.p["hypervisor"] = hypervisor p.p["password"] = password p.p["podid"] = podid p.p["url"] = url p.p["username"] = username p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "HostService", ")", "NewAddBaremetalHostParams", "(", "hypervisor", "string", ",", "password", "string", ",", "podid", "string", ",", "url", "string", ",", "username", "string", ",", "zoneid", "string", ")", "*", "AddBaremetalHostParams", "{", "p", ":=", "&", "AddBaremetalHostParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "hypervisor", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "password", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "podid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "url", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "username", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AddBaremetalHostParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddBaremetalHostParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L163-L173
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewAddGloboDnsHostParams
func (s *HostService) NewAddGloboDnsHostParams(password string, physicalnetworkid string, url string, username string) *AddGloboDnsHostParams { p := &AddGloboDnsHostParams{} p.p = make(map[string]interface{}) p.p["password"] = password p.p["physicalnetworkid"] = physicalnetworkid p.p["url"] = url p.p["username"] = username return p }
go
func (s *HostService) NewAddGloboDnsHostParams(password string, physicalnetworkid string, url string, username string) *AddGloboDnsHostParams { p := &AddGloboDnsHostParams{} p.p = make(map[string]interface{}) p.p["password"] = password p.p["physicalnetworkid"] = physicalnetworkid p.p["url"] = url p.p["username"] = username return p }
[ "func", "(", "s", "*", "HostService", ")", "NewAddGloboDnsHostParams", "(", "password", "string", ",", "physicalnetworkid", "string", ",", "url", "string", ",", "username", "string", ")", "*", "AddGloboDnsHostParams", "{", "p", ":=", "&", "AddGloboDnsHostParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\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 AddGloboDnsHostParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddGloboDnsHostParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L319-L327
train
xanzy/go-cloudstack
cloudstack/HostService.go
AddGloboDnsHost
func (s *HostService) AddGloboDnsHost(p *AddGloboDnsHostParams) (*AddGloboDnsHostResponse, error) { resp, err := s.cs.newRequest("addGloboDnsHost", p.toURLValues()) if err != nil { return nil, err } var r AddGloboDnsHostResponse 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 *HostService) AddGloboDnsHost(p *AddGloboDnsHostParams) (*AddGloboDnsHostResponse, error) { resp, err := s.cs.newRequest("addGloboDnsHost", p.toURLValues()) if err != nil { return nil, err } var r AddGloboDnsHostResponse 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", "*", "HostService", ")", "AddGloboDnsHost", "(", "p", "*", "AddGloboDnsHostParams", ")", "(", "*", "AddGloboDnsHostResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "AddGloboDnsHostResponse", "\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", "}" ]
// Adds the GloboDNS external host
[ "Adds", "the", "GloboDNS", "external", "host" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L330-L357
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewAddHostParams
func (s *HostService) NewAddHostParams(hypervisor string, password string, podid string, url string, username string, zoneid string) *AddHostParams { p := &AddHostParams{} p.p = make(map[string]interface{}) p.p["hypervisor"] = hypervisor p.p["password"] = password p.p["podid"] = podid p.p["url"] = url p.p["username"] = username p.p["zoneid"] = zoneid return p }
go
func (s *HostService) NewAddHostParams(hypervisor string, password string, podid string, url string, username string, zoneid string) *AddHostParams { p := &AddHostParams{} p.p = make(map[string]interface{}) p.p["hypervisor"] = hypervisor p.p["password"] = password p.p["podid"] = podid p.p["url"] = url p.p["username"] = username p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "HostService", ")", "NewAddHostParams", "(", "hypervisor", "string", ",", "password", "string", ",", "podid", "string", ",", "url", "string", ",", "username", "string", ",", "zoneid", "string", ")", "*", "AddHostParams", "{", "p", ":=", "&", "AddHostParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "hypervisor", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "password", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "podid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "url", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "username", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AddHostParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddHostParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L490-L500
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewAddSecondaryStorageParams
func (s *HostService) NewAddSecondaryStorageParams(url string) *AddSecondaryStorageParams { p := &AddSecondaryStorageParams{} p.p = make(map[string]interface{}) p.p["url"] = url return p }
go
func (s *HostService) NewAddSecondaryStorageParams(url string) *AddSecondaryStorageParams { p := &AddSecondaryStorageParams{} p.p = make(map[string]interface{}) p.p["url"] = url return p }
[ "func", "(", "s", "*", "HostService", ")", "NewAddSecondaryStorageParams", "(", "url", "string", ")", "*", "AddSecondaryStorageParams", "{", "p", ":=", "&", "AddSecondaryStorageParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "url", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AddSecondaryStorageParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddSecondaryStorageParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L624-L629
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewCancelHostMaintenanceParams
func (s *HostService) NewCancelHostMaintenanceParams(id string) *CancelHostMaintenanceParams { p := &CancelHostMaintenanceParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *HostService) NewCancelHostMaintenanceParams(id string) *CancelHostMaintenanceParams { p := &CancelHostMaintenanceParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "HostService", ")", "NewCancelHostMaintenanceParams", "(", "id", "string", ")", "*", "CancelHostMaintenanceParams", "{", "p", ":=", "&", "CancelHostMaintenanceParams", "{", "}", "\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 CancelHostMaintenanceParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CancelHostMaintenanceParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L682-L687
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewDedicateHostParams
func (s *HostService) NewDedicateHostParams(domainid string, hostid string) *DedicateHostParams { p := &DedicateHostParams{} p.p = make(map[string]interface{}) p.p["domainid"] = domainid p.p["hostid"] = hostid return p }
go
func (s *HostService) NewDedicateHostParams(domainid string, hostid string) *DedicateHostParams { p := &DedicateHostParams{} p.p = make(map[string]interface{}) p.p["domainid"] = domainid p.p["hostid"] = hostid return p }
[ "func", "(", "s", "*", "HostService", ")", "NewDedicateHostParams", "(", "domainid", "string", ",", "hostid", "string", ")", "*", "DedicateHostParams", "{", "p", ":=", "&", "DedicateHostParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "domainid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "hostid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DedicateHostParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DedicateHostParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L843-L849
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewDeleteHostParams
func (s *HostService) NewDeleteHostParams(id string) *DeleteHostParams { p := &DeleteHostParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *HostService) NewDeleteHostParams(id string) *DeleteHostParams { p := &DeleteHostParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "HostService", ")", "NewDeleteHostParams", "(", "id", "string", ")", "*", "DeleteHostParams", "{", "p", ":=", "&", "DeleteHostParams", "{", "}", "\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 DeleteHostParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteHostParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L945-L950
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewDisableOutOfBandManagementForHostParams
func (s *HostService) NewDisableOutOfBandManagementForHostParams(hostid string) *DisableOutOfBandManagementForHostParams { p := &DisableOutOfBandManagementForHostParams{} p.p = make(map[string]interface{}) p.p["hostid"] = hostid return p }
go
func (s *HostService) NewDisableOutOfBandManagementForHostParams(hostid string) *DisableOutOfBandManagementForHostParams { p := &DisableOutOfBandManagementForHostParams{} p.p = make(map[string]interface{}) p.p["hostid"] = hostid return p }
[ "func", "(", "s", "*", "HostService", ")", "NewDisableOutOfBandManagementForHostParams", "(", "hostid", "string", ")", "*", "DisableOutOfBandManagementForHostParams", "{", "p", ":=", "&", "DisableOutOfBandManagementForHostParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "hostid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DisableOutOfBandManagementForHostParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DisableOutOfBandManagementForHostParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L1016-L1021
train
xanzy/go-cloudstack
cloudstack/HostService.go
DisableOutOfBandManagementForHost
func (s *HostService) DisableOutOfBandManagementForHost(p *DisableOutOfBandManagementForHostParams) (*DisableOutOfBandManagementForHostResponse, error) { resp, err := s.cs.newRequest("disableOutOfBandManagementForHost", p.toURLValues()) if err != nil { return nil, err } var r DisableOutOfBandManagementForHostResponse 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 *HostService) DisableOutOfBandManagementForHost(p *DisableOutOfBandManagementForHostParams) (*DisableOutOfBandManagementForHostResponse, error) { resp, err := s.cs.newRequest("disableOutOfBandManagementForHost", p.toURLValues()) if err != nil { return nil, err } var r DisableOutOfBandManagementForHostResponse 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", "*", "HostService", ")", "DisableOutOfBandManagementForHost", "(", "p", "*", "DisableOutOfBandManagementForHostParams", ")", "(", "*", "DisableOutOfBandManagementForHostResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DisableOutOfBandManagementForHostResponse", "\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 out-of-band management for a host
[ "Disables", "out", "-", "of", "-", "band", "management", "for", "a", "host" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L1024-L1056
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewEnableOutOfBandManagementForHostParams
func (s *HostService) NewEnableOutOfBandManagementForHostParams(hostid string) *EnableOutOfBandManagementForHostParams { p := &EnableOutOfBandManagementForHostParams{} p.p = make(map[string]interface{}) p.p["hostid"] = hostid return p }
go
func (s *HostService) NewEnableOutOfBandManagementForHostParams(hostid string) *EnableOutOfBandManagementForHostParams { p := &EnableOutOfBandManagementForHostParams{} p.p = make(map[string]interface{}) p.p["hostid"] = hostid return p }
[ "func", "(", "s", "*", "HostService", ")", "NewEnableOutOfBandManagementForHostParams", "(", "hostid", "string", ")", "*", "EnableOutOfBandManagementForHostParams", "{", "p", ":=", "&", "EnableOutOfBandManagementForHostParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "hostid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new EnableOutOfBandManagementForHostParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "EnableOutOfBandManagementForHostParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L1098-L1103
train
xanzy/go-cloudstack
cloudstack/HostService.go
EnableOutOfBandManagementForHost
func (s *HostService) EnableOutOfBandManagementForHost(p *EnableOutOfBandManagementForHostParams) (*EnableOutOfBandManagementForHostResponse, error) { resp, err := s.cs.newRequest("enableOutOfBandManagementForHost", p.toURLValues()) if err != nil { return nil, err } var r EnableOutOfBandManagementForHostResponse 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 *HostService) EnableOutOfBandManagementForHost(p *EnableOutOfBandManagementForHostParams) (*EnableOutOfBandManagementForHostResponse, error) { resp, err := s.cs.newRequest("enableOutOfBandManagementForHost", p.toURLValues()) if err != nil { return nil, err } var r EnableOutOfBandManagementForHostResponse 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", "*", "HostService", ")", "EnableOutOfBandManagementForHost", "(", "p", "*", "EnableOutOfBandManagementForHostParams", ")", "(", "*", "EnableOutOfBandManagementForHostResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "EnableOutOfBandManagementForHostResponse", "\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 out-of-band management for a host
[ "Enables", "out", "-", "of", "-", "band", "management", "for", "a", "host" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L1106-L1138
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewFindHostsForMigrationParams
func (s *HostService) NewFindHostsForMigrationParams(virtualmachineid string) *FindHostsForMigrationParams { p := &FindHostsForMigrationParams{} p.p = make(map[string]interface{}) p.p["virtualmachineid"] = virtualmachineid return p }
go
func (s *HostService) NewFindHostsForMigrationParams(virtualmachineid string) *FindHostsForMigrationParams { p := &FindHostsForMigrationParams{} p.p = make(map[string]interface{}) p.p["virtualmachineid"] = virtualmachineid return p }
[ "func", "(", "s", "*", "HostService", ")", "NewFindHostsForMigrationParams", "(", "virtualmachineid", "string", ")", "*", "FindHostsForMigrationParams", "{", "p", ":=", "&", "FindHostsForMigrationParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "virtualmachineid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new FindHostsForMigrationParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "FindHostsForMigrationParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L1215-L1220
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewListDedicatedHostsParams
func (s *HostService) NewListDedicatedHostsParams() *ListDedicatedHostsParams { p := &ListDedicatedHostsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *HostService) NewListDedicatedHostsParams() *ListDedicatedHostsParams { p := &ListDedicatedHostsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "HostService", ")", "NewListDedicatedHostsParams", "(", ")", "*", "ListDedicatedHostsParams", "{", "p", ":=", "&", "ListDedicatedHostsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListDedicatedHostsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListDedicatedHostsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L1378-L1382
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewListHostTagsParams
func (s *HostService) NewListHostTagsParams() *ListHostTagsParams { p := &ListHostTagsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *HostService) NewListHostTagsParams() *ListHostTagsParams { p := &ListHostTagsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "HostService", ")", "NewListHostTagsParams", "(", ")", "*", "ListHostTagsParams", "{", "p", ":=", "&", "ListHostTagsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListHostTagsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListHostTagsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L1462-L1466
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewListHostsParams
func (s *HostService) NewListHostsParams() *ListHostsParams { p := &ListHostsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *HostService) NewListHostsParams() *ListHostsParams { p := &ListHostsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "HostService", ")", "NewListHostsParams", "(", ")", "*", "ListHostsParams", "{", "p", ":=", "&", "ListHostsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListHostsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListHostsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L1736-L1740
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewPrepareHostForMaintenanceParams
func (s *HostService) NewPrepareHostForMaintenanceParams(id string) *PrepareHostForMaintenanceParams { p := &PrepareHostForMaintenanceParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *HostService) NewPrepareHostForMaintenanceParams(id string) *PrepareHostForMaintenanceParams { p := &PrepareHostForMaintenanceParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "HostService", ")", "NewPrepareHostForMaintenanceParams", "(", "id", "string", ")", "*", "PrepareHostForMaintenanceParams", "{", "p", ":=", "&", "PrepareHostForMaintenanceParams", "{", "}", "\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 PrepareHostForMaintenanceParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "PrepareHostForMaintenanceParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L1941-L1946
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewReconnectHostParams
func (s *HostService) NewReconnectHostParams(id string) *ReconnectHostParams { p := &ReconnectHostParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *HostService) NewReconnectHostParams(id string) *ReconnectHostParams { p := &ReconnectHostParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "HostService", ")", "NewReconnectHostParams", "(", "id", "string", ")", "*", "ReconnectHostParams", "{", "p", ":=", "&", "ReconnectHostParams", "{", "}", "\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 ReconnectHostParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ReconnectHostParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L2080-L2085
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewReleaseDedicatedHostParams
func (s *HostService) NewReleaseDedicatedHostParams(hostid string) *ReleaseDedicatedHostParams { p := &ReleaseDedicatedHostParams{} p.p = make(map[string]interface{}) p.p["hostid"] = hostid return p }
go
func (s *HostService) NewReleaseDedicatedHostParams(hostid string) *ReleaseDedicatedHostParams { p := &ReleaseDedicatedHostParams{} p.p = make(map[string]interface{}) p.p["hostid"] = hostid return p }
[ "func", "(", "s", "*", "HostService", ")", "NewReleaseDedicatedHostParams", "(", "hostid", "string", ")", "*", "ReleaseDedicatedHostParams", "{", "p", ":=", "&", "ReleaseDedicatedHostParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "hostid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ReleaseDedicatedHostParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ReleaseDedicatedHostParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L2219-L2224
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewReleaseHostReservationParams
func (s *HostService) NewReleaseHostReservationParams(id string) *ReleaseHostReservationParams { p := &ReleaseHostReservationParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *HostService) NewReleaseHostReservationParams(id string) *ReleaseHostReservationParams { p := &ReleaseHostReservationParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "HostService", ")", "NewReleaseHostReservationParams", "(", "id", "string", ")", "*", "ReleaseHostReservationParams", "{", "p", ":=", "&", "ReleaseHostReservationParams", "{", "}", "\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 ReleaseHostReservationParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ReleaseHostReservationParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L2287-L2292
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewUpdateHostParams
func (s *HostService) NewUpdateHostParams(id string) *UpdateHostParams { p := &UpdateHostParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *HostService) NewUpdateHostParams(id string) *UpdateHostParams { p := &UpdateHostParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "HostService", ")", "NewUpdateHostParams", "(", "id", "string", ")", "*", "UpdateHostParams", "{", "p", ":=", "&", "UpdateHostParams", "{", "}", "\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 UpdateHostParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateHostParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L2411-L2416
train
xanzy/go-cloudstack
cloudstack/HostService.go
NewUpdateHostPasswordParams
func (s *HostService) NewUpdateHostPasswordParams(password string, username string) *UpdateHostPasswordParams { p := &UpdateHostPasswordParams{} p.p = make(map[string]interface{}) p.p["password"] = password p.p["username"] = username return p }
go
func (s *HostService) NewUpdateHostPasswordParams(password string, username string) *UpdateHostPasswordParams { p := &UpdateHostPasswordParams{} p.p = make(map[string]interface{}) p.p["password"] = password p.p["username"] = username return p }
[ "func", "(", "s", "*", "HostService", ")", "NewUpdateHostPasswordParams", "(", "password", "string", ",", "username", "string", ")", "*", "UpdateHostPasswordParams", "{", "p", ":=", "&", "UpdateHostPasswordParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "password", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "username", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UpdateHostPasswordParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateHostPasswordParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/HostService.go#L2574-L2580
train
xanzy/go-cloudstack
cloudstack/NetworkDeviceService.go
NewAddNetworkDeviceParams
func (s *NetworkDeviceService) NewAddNetworkDeviceParams() *AddNetworkDeviceParams { p := &AddNetworkDeviceParams{} p.p = make(map[string]interface{}) return p }
go
func (s *NetworkDeviceService) NewAddNetworkDeviceParams() *AddNetworkDeviceParams { p := &AddNetworkDeviceParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "NetworkDeviceService", ")", "NewAddNetworkDeviceParams", "(", ")", "*", "AddNetworkDeviceParams", "{", "p", ":=", "&", "AddNetworkDeviceParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AddNetworkDeviceParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddNetworkDeviceParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkDeviceService.go#L67-L71
train
xanzy/go-cloudstack
cloudstack/NetworkDeviceService.go
NewDeleteNetworkDeviceParams
func (s *NetworkDeviceService) NewDeleteNetworkDeviceParams(id string) *DeleteNetworkDeviceParams { p := &DeleteNetworkDeviceParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *NetworkDeviceService) NewDeleteNetworkDeviceParams(id string) *DeleteNetworkDeviceParams { p := &DeleteNetworkDeviceParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "NetworkDeviceService", ")", "NewDeleteNetworkDeviceParams", "(", "id", "string", ")", "*", "DeleteNetworkDeviceParams", "{", "p", ":=", "&", "DeleteNetworkDeviceParams", "{", "}", "\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 DeleteNetworkDeviceParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteNetworkDeviceParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkDeviceService.go#L117-L122
train
xanzy/go-cloudstack
cloudstack/NetworkDeviceService.go
DeleteNetworkDevice
func (s *NetworkDeviceService) DeleteNetworkDevice(p *DeleteNetworkDeviceParams) (*DeleteNetworkDeviceResponse, error) { resp, err := s.cs.newRequest("deleteNetworkDevice", p.toURLValues()) if err != nil { return nil, err } var r DeleteNetworkDeviceResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *NetworkDeviceService) DeleteNetworkDevice(p *DeleteNetworkDeviceParams) (*DeleteNetworkDeviceResponse, error) { resp, err := s.cs.newRequest("deleteNetworkDevice", p.toURLValues()) if err != nil { return nil, err } var r DeleteNetworkDeviceResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "NetworkDeviceService", ")", "DeleteNetworkDevice", "(", "p", "*", "DeleteNetworkDeviceParams", ")", "(", "*", "DeleteNetworkDeviceResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteNetworkDeviceResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Deletes network device.
[ "Deletes", "network", "device", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkDeviceService.go#L125-L137
train
xanzy/go-cloudstack
cloudstack/NetworkDeviceService.go
NewListNetworkDeviceParams
func (s *NetworkDeviceService) NewListNetworkDeviceParams() *ListNetworkDeviceParams { p := &ListNetworkDeviceParams{} p.p = make(map[string]interface{}) return p }
go
func (s *NetworkDeviceService) NewListNetworkDeviceParams() *ListNetworkDeviceParams { p := &ListNetworkDeviceParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "NetworkDeviceService", ")", "NewListNetworkDeviceParams", "(", ")", "*", "ListNetworkDeviceParams", "{", "p", ":=", "&", "ListNetworkDeviceParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListNetworkDeviceParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListNetworkDeviceParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkDeviceService.go#L239-L243
train
xanzy/go-cloudstack
cloudstack/NetworkDeviceService.go
ListNetworkDevice
func (s *NetworkDeviceService) ListNetworkDevice(p *ListNetworkDeviceParams) (*ListNetworkDeviceResponse, error) { resp, err := s.cs.newRequest("listNetworkDevice", p.toURLValues()) if err != nil { return nil, err } var r ListNetworkDeviceResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *NetworkDeviceService) ListNetworkDevice(p *ListNetworkDeviceParams) (*ListNetworkDeviceResponse, error) { resp, err := s.cs.newRequest("listNetworkDevice", p.toURLValues()) if err != nil { return nil, err } var r ListNetworkDeviceResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "NetworkDeviceService", ")", "ListNetworkDevice", "(", "p", "*", "ListNetworkDeviceParams", ")", "(", "*", "ListNetworkDeviceResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListNetworkDeviceResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// List network devices
[ "List", "network", "devices" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkDeviceService.go#L246-L258
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewCreatePrivateGatewayParams
func (s *VPCService) NewCreatePrivateGatewayParams(gateway string, ipaddress string, netmask string, vlan string, vpcid string) *CreatePrivateGatewayParams { p := &CreatePrivateGatewayParams{} p.p = make(map[string]interface{}) p.p["gateway"] = gateway p.p["ipaddress"] = ipaddress p.p["netmask"] = netmask p.p["vlan"] = vlan p.p["vpcid"] = vpcid return p }
go
func (s *VPCService) NewCreatePrivateGatewayParams(gateway string, ipaddress string, netmask string, vlan string, vpcid string) *CreatePrivateGatewayParams { p := &CreatePrivateGatewayParams{} p.p = make(map[string]interface{}) p.p["gateway"] = gateway p.p["ipaddress"] = ipaddress p.p["netmask"] = netmask p.p["vlan"] = vlan p.p["vpcid"] = vpcid return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewCreatePrivateGatewayParams", "(", "gateway", "string", ",", "ipaddress", "string", ",", "netmask", "string", ",", "vlan", "string", ",", "vpcid", "string", ")", "*", "CreatePrivateGatewayParams", "{", "p", ":=", "&", "CreatePrivateGatewayParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "gateway", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "ipaddress", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "netmask", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "vlan", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "vpcid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreatePrivateGatewayParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreatePrivateGatewayParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L141-L150
train
xanzy/go-cloudstack
cloudstack/VPCService.go
CreatePrivateGateway
func (s *VPCService) CreatePrivateGateway(p *CreatePrivateGatewayParams) (*CreatePrivateGatewayResponse, error) { resp, err := s.cs.newRequest("createPrivateGateway", p.toURLValues()) if err != nil { return nil, err } var r CreatePrivateGatewayResponse 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 *VPCService) CreatePrivateGateway(p *CreatePrivateGatewayParams) (*CreatePrivateGatewayResponse, error) { resp, err := s.cs.newRequest("createPrivateGateway", p.toURLValues()) if err != nil { return nil, err } var r CreatePrivateGatewayResponse 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", "*", "VPCService", ")", "CreatePrivateGateway", "(", "p", "*", "CreatePrivateGatewayParams", ")", "(", "*", "CreatePrivateGatewayResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreatePrivateGatewayResponse", "\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 private gateway
[ "Creates", "a", "private", "gateway" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L153-L185
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewCreateStaticRouteParams
func (s *VPCService) NewCreateStaticRouteParams(cidr string, gatewayid string) *CreateStaticRouteParams { p := &CreateStaticRouteParams{} p.p = make(map[string]interface{}) p.p["cidr"] = cidr p.p["gatewayid"] = gatewayid return p }
go
func (s *VPCService) NewCreateStaticRouteParams(cidr string, gatewayid string) *CreateStaticRouteParams { p := &CreateStaticRouteParams{} p.p = make(map[string]interface{}) p.p["cidr"] = cidr p.p["gatewayid"] = gatewayid return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewCreateStaticRouteParams", "(", "cidr", "string", ",", "gatewayid", "string", ")", "*", "CreateStaticRouteParams", "{", "p", ":=", "&", "CreateStaticRouteParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "cidr", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "gatewayid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateStaticRouteParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateStaticRouteParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L244-L250
train
xanzy/go-cloudstack
cloudstack/VPCService.go
CreateStaticRoute
func (s *VPCService) CreateStaticRoute(p *CreateStaticRouteParams) (*CreateStaticRouteResponse, error) { resp, err := s.cs.newRequest("createStaticRoute", p.toURLValues()) if err != nil { return nil, err } var r CreateStaticRouteResponse 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 *VPCService) CreateStaticRoute(p *CreateStaticRouteParams) (*CreateStaticRouteResponse, error) { resp, err := s.cs.newRequest("createStaticRoute", p.toURLValues()) if err != nil { return nil, err } var r CreateStaticRouteResponse 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", "*", "VPCService", ")", "CreateStaticRoute", "(", "p", "*", "CreateStaticRouteParams", ")", "(", "*", "CreateStaticRouteResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateStaticRouteResponse", "\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 static route
[ "Creates", "a", "static", "route" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L253-L285
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewCreateVPCParams
func (s *VPCService) NewCreateVPCParams(cidr string, displaytext string, name string, vpcofferingid string, zoneid string) *CreateVPCParams { p := &CreateVPCParams{} p.p = make(map[string]interface{}) p.p["cidr"] = cidr p.p["displaytext"] = displaytext p.p["name"] = name p.p["vpcofferingid"] = vpcofferingid p.p["zoneid"] = zoneid return p }
go
func (s *VPCService) NewCreateVPCParams(cidr string, displaytext string, name string, vpcofferingid string, zoneid string) *CreateVPCParams { p := &CreateVPCParams{} p.p = make(map[string]interface{}) p.p["cidr"] = cidr p.p["displaytext"] = displaytext p.p["name"] = name p.p["vpcofferingid"] = vpcofferingid p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewCreateVPCParams", "(", "cidr", "string", ",", "displaytext", "string", ",", "name", "string", ",", "vpcofferingid", "string", ",", "zoneid", "string", ")", "*", "CreateVPCParams", "{", "p", ":=", "&", "CreateVPCParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "cidr", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "displaytext", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "vpcofferingid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateVPCParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateVPCParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L439-L448
train
xanzy/go-cloudstack
cloudstack/VPCService.go
CreateVPC
func (s *VPCService) CreateVPC(p *CreateVPCParams) (*CreateVPCResponse, error) { resp, err := s.cs.newRequest("createVPC", p.toURLValues()) if err != nil { return nil, err } var r CreateVPCResponse 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 *VPCService) CreateVPC(p *CreateVPCParams) (*CreateVPCResponse, error) { resp, err := s.cs.newRequest("createVPC", p.toURLValues()) if err != nil { return nil, err } var r CreateVPCResponse 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", "*", "VPCService", ")", "CreateVPC", "(", "p", "*", "CreateVPCParams", ")", "(", "*", "CreateVPCResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateVPCResponse", "\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 VPC
[ "Creates", "a", "VPC" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L451-L483
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewCreateVPCOfferingParams
func (s *VPCService) NewCreateVPCOfferingParams(displaytext string, name string, supportedservices []string) *CreateVPCOfferingParams { p := &CreateVPCOfferingParams{} p.p = make(map[string]interface{}) p.p["displaytext"] = displaytext p.p["name"] = name p.p["supportedservices"] = supportedservices return p }
go
func (s *VPCService) NewCreateVPCOfferingParams(displaytext string, name string, supportedservices []string) *CreateVPCOfferingParams { p := &CreateVPCOfferingParams{} p.p = make(map[string]interface{}) p.p["displaytext"] = displaytext p.p["name"] = name p.p["supportedservices"] = supportedservices return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewCreateVPCOfferingParams", "(", "displaytext", "string", ",", "name", "string", ",", "supportedservices", "[", "]", "string", ")", "*", "CreateVPCOfferingParams", "{", "p", ":=", "&", "CreateVPCOfferingParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "displaytext", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "supportedservices", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateVPCOfferingParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateVPCOfferingParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L700-L707
train
xanzy/go-cloudstack
cloudstack/VPCService.go
CreateVPCOffering
func (s *VPCService) CreateVPCOffering(p *CreateVPCOfferingParams) (*CreateVPCOfferingResponse, error) { resp, err := s.cs.newRequest("createVPCOffering", p.toURLValues()) if err != nil { return nil, err } var r CreateVPCOfferingResponse 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 *VPCService) CreateVPCOffering(p *CreateVPCOfferingParams) (*CreateVPCOfferingResponse, error) { resp, err := s.cs.newRequest("createVPCOffering", p.toURLValues()) if err != nil { return nil, err } var r CreateVPCOfferingResponse 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", "*", "VPCService", ")", "CreateVPCOffering", "(", "p", "*", "CreateVPCOfferingParams", ")", "(", "*", "CreateVPCOfferingResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateVPCOfferingResponse", "\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 VPC offering
[ "Creates", "VPC", "offering" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L710-L742
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewDeletePrivateGatewayParams
func (s *VPCService) NewDeletePrivateGatewayParams(id string) *DeletePrivateGatewayParams { p := &DeletePrivateGatewayParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPCService) NewDeletePrivateGatewayParams(id string) *DeletePrivateGatewayParams { p := &DeletePrivateGatewayParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewDeletePrivateGatewayParams", "(", "id", "string", ")", "*", "DeletePrivateGatewayParams", "{", "p", ":=", "&", "DeletePrivateGatewayParams", "{", "}", "\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 DeletePrivateGatewayParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeletePrivateGatewayParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L804-L809
train
xanzy/go-cloudstack
cloudstack/VPCService.go
DeletePrivateGateway
func (s *VPCService) DeletePrivateGateway(p *DeletePrivateGatewayParams) (*DeletePrivateGatewayResponse, error) { resp, err := s.cs.newRequest("deletePrivateGateway", p.toURLValues()) if err != nil { return nil, err } var r DeletePrivateGatewayResponse 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 *VPCService) DeletePrivateGateway(p *DeletePrivateGatewayParams) (*DeletePrivateGatewayResponse, error) { resp, err := s.cs.newRequest("deletePrivateGateway", p.toURLValues()) if err != nil { return nil, err } var r DeletePrivateGatewayResponse 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", "*", "VPCService", ")", "DeletePrivateGateway", "(", "p", "*", "DeletePrivateGatewayParams", ")", "(", "*", "DeletePrivateGatewayResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeletePrivateGatewayResponse", "\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 Private gateway
[ "Deletes", "a", "Private", "gateway" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L812-L839
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewDeleteStaticRouteParams
func (s *VPCService) NewDeleteStaticRouteParams(id string) *DeleteStaticRouteParams { p := &DeleteStaticRouteParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPCService) NewDeleteStaticRouteParams(id string) *DeleteStaticRouteParams { p := &DeleteStaticRouteParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewDeleteStaticRouteParams", "(", "id", "string", ")", "*", "DeleteStaticRouteParams", "{", "p", ":=", "&", "DeleteStaticRouteParams", "{", "}", "\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 DeleteStaticRouteParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteStaticRouteParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L872-L877
train
xanzy/go-cloudstack
cloudstack/VPCService.go
DeleteStaticRoute
func (s *VPCService) DeleteStaticRoute(p *DeleteStaticRouteParams) (*DeleteStaticRouteResponse, error) { resp, err := s.cs.newRequest("deleteStaticRoute", p.toURLValues()) if err != nil { return nil, err } var r DeleteStaticRouteResponse 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 *VPCService) DeleteStaticRoute(p *DeleteStaticRouteParams) (*DeleteStaticRouteResponse, error) { resp, err := s.cs.newRequest("deleteStaticRoute", p.toURLValues()) if err != nil { return nil, err } var r DeleteStaticRouteResponse 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", "*", "VPCService", ")", "DeleteStaticRoute", "(", "p", "*", "DeleteStaticRouteParams", ")", "(", "*", "DeleteStaticRouteResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteStaticRouteResponse", "\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 static route
[ "Deletes", "a", "static", "route" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L880-L907
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewDeleteVPCParams
func (s *VPCService) NewDeleteVPCParams(id string) *DeleteVPCParams { p := &DeleteVPCParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPCService) NewDeleteVPCParams(id string) *DeleteVPCParams { p := &DeleteVPCParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewDeleteVPCParams", "(", "id", "string", ")", "*", "DeleteVPCParams", "{", "p", ":=", "&", "DeleteVPCParams", "{", "}", "\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 DeleteVPCParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteVPCParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L940-L945
train
xanzy/go-cloudstack
cloudstack/VPCService.go
DeleteVPC
func (s *VPCService) DeleteVPC(p *DeleteVPCParams) (*DeleteVPCResponse, error) { resp, err := s.cs.newRequest("deleteVPC", p.toURLValues()) if err != nil { return nil, err } var r DeleteVPCResponse 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 *VPCService) DeleteVPC(p *DeleteVPCParams) (*DeleteVPCResponse, error) { resp, err := s.cs.newRequest("deleteVPC", p.toURLValues()) if err != nil { return nil, err } var r DeleteVPCResponse 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", "*", "VPCService", ")", "DeleteVPC", "(", "p", "*", "DeleteVPCParams", ")", "(", "*", "DeleteVPCResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteVPCResponse", "\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 VPC
[ "Deletes", "a", "VPC" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L948-L975
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewDeleteVPCOfferingParams
func (s *VPCService) NewDeleteVPCOfferingParams(id string) *DeleteVPCOfferingParams { p := &DeleteVPCOfferingParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPCService) NewDeleteVPCOfferingParams(id string) *DeleteVPCOfferingParams { p := &DeleteVPCOfferingParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewDeleteVPCOfferingParams", "(", "id", "string", ")", "*", "DeleteVPCOfferingParams", "{", "p", ":=", "&", "DeleteVPCOfferingParams", "{", "}", "\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 DeleteVPCOfferingParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteVPCOfferingParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L1008-L1013
train
xanzy/go-cloudstack
cloudstack/VPCService.go
DeleteVPCOffering
func (s *VPCService) DeleteVPCOffering(p *DeleteVPCOfferingParams) (*DeleteVPCOfferingResponse, error) { resp, err := s.cs.newRequest("deleteVPCOffering", p.toURLValues()) if err != nil { return nil, err } var r DeleteVPCOfferingResponse 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 *VPCService) DeleteVPCOffering(p *DeleteVPCOfferingParams) (*DeleteVPCOfferingResponse, error) { resp, err := s.cs.newRequest("deleteVPCOffering", p.toURLValues()) if err != nil { return nil, err } var r DeleteVPCOfferingResponse 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", "*", "VPCService", ")", "DeleteVPCOffering", "(", "p", "*", "DeleteVPCOfferingParams", ")", "(", "*", "DeleteVPCOfferingResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteVPCOfferingResponse", "\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 VPC offering
[ "Deletes", "VPC", "offering" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L1016-L1043
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewListPrivateGatewaysParams
func (s *VPCService) NewListPrivateGatewaysParams() *ListPrivateGatewaysParams { p := &ListPrivateGatewaysParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VPCService) NewListPrivateGatewaysParams() *ListPrivateGatewaysParams { p := &ListPrivateGatewaysParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewListPrivateGatewaysParams", "(", ")", "*", "ListPrivateGatewaysParams", "{", "p", ":=", "&", "ListPrivateGatewaysParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListPrivateGatewaysParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListPrivateGatewaysParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L1212-L1216
train
xanzy/go-cloudstack
cloudstack/VPCService.go
ListPrivateGateways
func (s *VPCService) ListPrivateGateways(p *ListPrivateGatewaysParams) (*ListPrivateGatewaysResponse, error) { resp, err := s.cs.newRequest("listPrivateGateways", p.toURLValues()) if err != nil { return nil, err } var r ListPrivateGatewaysResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VPCService) ListPrivateGateways(p *ListPrivateGatewaysParams) (*ListPrivateGatewaysResponse, error) { resp, err := s.cs.newRequest("listPrivateGateways", p.toURLValues()) if err != nil { return nil, err } var r ListPrivateGatewaysResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VPCService", ")", "ListPrivateGateways", "(", "p", "*", "ListPrivateGatewaysParams", ")", "(", "*", "ListPrivateGatewaysResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListPrivateGatewaysResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// List private gateways
[ "List", "private", "gateways" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L1252-L1264
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewListStaticRoutesParams
func (s *VPCService) NewListStaticRoutesParams() *ListStaticRoutesParams { p := &ListStaticRoutesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VPCService) NewListStaticRoutesParams() *ListStaticRoutesParams { p := &ListStaticRoutesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewListStaticRoutesParams", "(", ")", "*", "ListStaticRoutesParams", "{", "p", ":=", "&", "ListStaticRoutesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListStaticRoutesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListStaticRoutesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L1446-L1450
train
xanzy/go-cloudstack
cloudstack/VPCService.go
ListStaticRoutes
func (s *VPCService) ListStaticRoutes(p *ListStaticRoutesParams) (*ListStaticRoutesResponse, error) { resp, err := s.cs.newRequest("listStaticRoutes", p.toURLValues()) if err != nil { return nil, err } var r ListStaticRoutesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VPCService) ListStaticRoutes(p *ListStaticRoutesParams) (*ListStaticRoutesResponse, error) { resp, err := s.cs.newRequest("listStaticRoutes", p.toURLValues()) if err != nil { return nil, err } var r ListStaticRoutesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VPCService", ")", "ListStaticRoutes", "(", "p", "*", "ListStaticRoutesParams", ")", "(", "*", "ListStaticRoutesResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListStaticRoutesResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists all static routes
[ "Lists", "all", "static", "routes" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L1486-L1498
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewListVPCOfferingsParams
func (s *VPCService) NewListVPCOfferingsParams() *ListVPCOfferingsParams { p := &ListVPCOfferingsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VPCService) NewListVPCOfferingsParams() *ListVPCOfferingsParams { p := &ListVPCOfferingsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewListVPCOfferingsParams", "(", ")", "*", "ListVPCOfferingsParams", "{", "p", ":=", "&", "ListVPCOfferingsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListVPCOfferingsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListVPCOfferingsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L1636-L1640
train
xanzy/go-cloudstack
cloudstack/VPCService.go
ListVPCOfferings
func (s *VPCService) ListVPCOfferings(p *ListVPCOfferingsParams) (*ListVPCOfferingsResponse, error) { resp, err := s.cs.newRequest("listVPCOfferings", p.toURLValues()) if err != nil { return nil, err } var r ListVPCOfferingsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VPCService) ListVPCOfferings(p *ListVPCOfferingsParams) (*ListVPCOfferingsResponse, error) { resp, err := s.cs.newRequest("listVPCOfferings", p.toURLValues()) if err != nil { return nil, err } var r ListVPCOfferingsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VPCService", ")", "ListVPCOfferings", "(", "p", "*", "ListVPCOfferingsParams", ")", "(", "*", "ListVPCOfferingsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListVPCOfferingsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists VPC offerings
[ "Lists", "VPC", "offerings" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L1726-L1738
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewListVPCsParams
func (s *VPCService) NewListVPCsParams() *ListVPCsParams { p := &ListVPCsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VPCService) NewListVPCsParams() *ListVPCsParams { p := &ListVPCsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewListVPCsParams", "(", ")", "*", "ListVPCsParams", "{", "p", ":=", "&", "ListVPCsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListVPCsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListVPCsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L2014-L2018
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewRestartVPCParams
func (s *VPCService) NewRestartVPCParams(id string) *RestartVPCParams { p := &RestartVPCParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPCService) NewRestartVPCParams(id string) *RestartVPCParams { p := &RestartVPCParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewRestartVPCParams", "(", "id", "string", ")", "*", "RestartVPCParams", "{", "p", ":=", "&", "RestartVPCParams", "{", "}", "\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 RestartVPCParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "RestartVPCParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L2295-L2300
train
xanzy/go-cloudstack
cloudstack/VPCService.go
RestartVPC
func (s *VPCService) RestartVPC(p *RestartVPCParams) (*RestartVPCResponse, error) { resp, err := s.cs.newRequest("restartVPC", p.toURLValues()) if err != nil { return nil, err } var r RestartVPCResponse 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 *VPCService) RestartVPC(p *RestartVPCParams) (*RestartVPCResponse, error) { resp, err := s.cs.newRequest("restartVPC", p.toURLValues()) if err != nil { return nil, err } var r RestartVPCResponse 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", "*", "VPCService", ")", "RestartVPC", "(", "p", "*", "RestartVPCParams", ")", "(", "*", "RestartVPCResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "RestartVPCResponse", "\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", "}" ]
// Restarts a VPC
[ "Restarts", "a", "VPC" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L2303-L2335
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewUpdateVPCParams
func (s *VPCService) NewUpdateVPCParams(id string) *UpdateVPCParams { p := &UpdateVPCParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPCService) NewUpdateVPCParams(id string) *UpdateVPCParams { p := &UpdateVPCParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewUpdateVPCParams", "(", "id", "string", ")", "*", "UpdateVPCParams", "{", "p", ":=", "&", "UpdateVPCParams", "{", "}", "\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 UpdateVPCParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateVPCParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L2531-L2536
train
xanzy/go-cloudstack
cloudstack/VPCService.go
UpdateVPC
func (s *VPCService) UpdateVPC(p *UpdateVPCParams) (*UpdateVPCResponse, error) { resp, err := s.cs.newRequest("updateVPC", p.toURLValues()) if err != nil { return nil, err } var r UpdateVPCResponse 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 *VPCService) UpdateVPC(p *UpdateVPCParams) (*UpdateVPCResponse, error) { resp, err := s.cs.newRequest("updateVPC", p.toURLValues()) if err != nil { return nil, err } var r UpdateVPCResponse 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", "*", "VPCService", ")", "UpdateVPC", "(", "p", "*", "UpdateVPCParams", ")", "(", "*", "UpdateVPCResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateVPCResponse", "\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 a VPC
[ "Updates", "a", "VPC" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L2539-L2571
train
xanzy/go-cloudstack
cloudstack/VPCService.go
NewUpdateVPCOfferingParams
func (s *VPCService) NewUpdateVPCOfferingParams(id string) *UpdateVPCOfferingParams { p := &UpdateVPCOfferingParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPCService) NewUpdateVPCOfferingParams(id string) *UpdateVPCOfferingParams { p := &UpdateVPCOfferingParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPCService", ")", "NewUpdateVPCOfferingParams", "(", "id", "string", ")", "*", "UpdateVPCOfferingParams", "{", "p", ":=", "&", "UpdateVPCOfferingParams", "{", "}", "\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 UpdateVPCOfferingParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateVPCOfferingParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L2755-L2760
train
xanzy/go-cloudstack
cloudstack/VPCService.go
UpdateVPCOffering
func (s *VPCService) UpdateVPCOffering(p *UpdateVPCOfferingParams) (*UpdateVPCOfferingResponse, error) { resp, err := s.cs.newRequest("updateVPCOffering", p.toURLValues()) if err != nil { return nil, err } var r UpdateVPCOfferingResponse 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 *VPCService) UpdateVPCOffering(p *UpdateVPCOfferingParams) (*UpdateVPCOfferingResponse, error) { resp, err := s.cs.newRequest("updateVPCOffering", p.toURLValues()) if err != nil { return nil, err } var r UpdateVPCOfferingResponse 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", "*", "VPCService", ")", "UpdateVPCOffering", "(", "p", "*", "UpdateVPCOfferingParams", ")", "(", "*", "UpdateVPCOfferingResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateVPCOfferingResponse", "\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 VPC offering
[ "Updates", "VPC", "offering" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPCService.go#L2763-L2795
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
NewCreateZoneParams
func (s *ZoneService) NewCreateZoneParams(dns1 string, internaldns1 string, name string, networktype string) *CreateZoneParams { p := &CreateZoneParams{} p.p = make(map[string]interface{}) p.p["dns1"] = dns1 p.p["internaldns1"] = internaldns1 p.p["name"] = name p.p["networktype"] = networktype return p }
go
func (s *ZoneService) NewCreateZoneParams(dns1 string, internaldns1 string, name string, networktype string) *CreateZoneParams { p := &CreateZoneParams{} p.p = make(map[string]interface{}) p.p["dns1"] = dns1 p.p["internaldns1"] = internaldns1 p.p["name"] = name p.p["networktype"] = networktype return p }
[ "func", "(", "s", "*", "ZoneService", ")", "NewCreateZoneParams", "(", "dns1", "string", ",", "internaldns1", "string", ",", "name", "string", ",", "networktype", "string", ")", "*", "CreateZoneParams", "{", "p", ":=", "&", "CreateZoneParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "dns1", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "internaldns1", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "networktype", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateZoneParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateZoneParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L197-L205
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
NewDedicateZoneParams
func (s *ZoneService) NewDedicateZoneParams(domainid string, zoneid string) *DedicateZoneParams { p := &DedicateZoneParams{} p.p = make(map[string]interface{}) p.p["domainid"] = domainid p.p["zoneid"] = zoneid return p }
go
func (s *ZoneService) NewDedicateZoneParams(domainid string, zoneid string) *DedicateZoneParams { p := &DedicateZoneParams{} p.p = make(map[string]interface{}) p.p["domainid"] = domainid p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "ZoneService", ")", "NewDedicateZoneParams", "(", "domainid", "string", ",", "zoneid", "string", ")", "*", "DedicateZoneParams", "{", "p", ":=", "&", "DedicateZoneParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "domainid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DedicateZoneParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DedicateZoneParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L310-L316
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
DedicateZone
func (s *ZoneService) DedicateZone(p *DedicateZoneParams) (*DedicateZoneResponse, error) { resp, err := s.cs.newRequest("dedicateZone", p.toURLValues()) if err != nil { return nil, err } var r DedicateZoneResponse 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 *ZoneService) DedicateZone(p *DedicateZoneParams) (*DedicateZoneResponse, error) { resp, err := s.cs.newRequest("dedicateZone", p.toURLValues()) if err != nil { return nil, err } var r DedicateZoneResponse 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", "*", "ZoneService", ")", "DedicateZone", "(", "p", "*", "DedicateZoneParams", ")", "(", "*", "DedicateZoneResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DedicateZoneResponse", "\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", "}" ]
// Dedicates a zones.
[ "Dedicates", "a", "zones", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L319-L351
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
NewDeleteZoneParams
func (s *ZoneService) NewDeleteZoneParams(id string) *DeleteZoneParams { p := &DeleteZoneParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *ZoneService) NewDeleteZoneParams(id string) *DeleteZoneParams { p := &DeleteZoneParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "ZoneService", ")", "NewDeleteZoneParams", "(", "id", "string", ")", "*", "DeleteZoneParams", "{", "p", ":=", "&", "DeleteZoneParams", "{", "}", "\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 DeleteZoneParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteZoneParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L388-L393
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
NewDisableOutOfBandManagementForZoneParams
func (s *ZoneService) NewDisableOutOfBandManagementForZoneParams(zoneid string) *DisableOutOfBandManagementForZoneParams { p := &DisableOutOfBandManagementForZoneParams{} p.p = make(map[string]interface{}) p.p["zoneid"] = zoneid return p }
go
func (s *ZoneService) NewDisableOutOfBandManagementForZoneParams(zoneid string) *DisableOutOfBandManagementForZoneParams { p := &DisableOutOfBandManagementForZoneParams{} p.p = make(map[string]interface{}) p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "ZoneService", ")", "NewDisableOutOfBandManagementForZoneParams", "(", "zoneid", "string", ")", "*", "DisableOutOfBandManagementForZoneParams", "{", "p", ":=", "&", "DisableOutOfBandManagementForZoneParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DisableOutOfBandManagementForZoneParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DisableOutOfBandManagementForZoneParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L459-L464
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
DisableOutOfBandManagementForZone
func (s *ZoneService) DisableOutOfBandManagementForZone(p *DisableOutOfBandManagementForZoneParams) (*DisableOutOfBandManagementForZoneResponse, error) { resp, err := s.cs.newRequest("disableOutOfBandManagementForZone", p.toURLValues()) if err != nil { return nil, err } var r DisableOutOfBandManagementForZoneResponse 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 *ZoneService) DisableOutOfBandManagementForZone(p *DisableOutOfBandManagementForZoneParams) (*DisableOutOfBandManagementForZoneResponse, error) { resp, err := s.cs.newRequest("disableOutOfBandManagementForZone", p.toURLValues()) if err != nil { return nil, err } var r DisableOutOfBandManagementForZoneResponse 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", "*", "ZoneService", ")", "DisableOutOfBandManagementForZone", "(", "p", "*", "DisableOutOfBandManagementForZoneParams", ")", "(", "*", "DisableOutOfBandManagementForZoneResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DisableOutOfBandManagementForZoneResponse", "\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 out-of-band management for a zone
[ "Disables", "out", "-", "of", "-", "band", "management", "for", "a", "zone" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L467-L499
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
NewEnableOutOfBandManagementForZoneParams
func (s *ZoneService) NewEnableOutOfBandManagementForZoneParams(zoneid string) *EnableOutOfBandManagementForZoneParams { p := &EnableOutOfBandManagementForZoneParams{} p.p = make(map[string]interface{}) p.p["zoneid"] = zoneid return p }
go
func (s *ZoneService) NewEnableOutOfBandManagementForZoneParams(zoneid string) *EnableOutOfBandManagementForZoneParams { p := &EnableOutOfBandManagementForZoneParams{} p.p = make(map[string]interface{}) p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "ZoneService", ")", "NewEnableOutOfBandManagementForZoneParams", "(", "zoneid", "string", ")", "*", "EnableOutOfBandManagementForZoneParams", "{", "p", ":=", "&", "EnableOutOfBandManagementForZoneParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new EnableOutOfBandManagementForZoneParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "EnableOutOfBandManagementForZoneParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L541-L546
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
EnableOutOfBandManagementForZone
func (s *ZoneService) EnableOutOfBandManagementForZone(p *EnableOutOfBandManagementForZoneParams) (*EnableOutOfBandManagementForZoneResponse, error) { resp, err := s.cs.newRequest("enableOutOfBandManagementForZone", p.toURLValues()) if err != nil { return nil, err } var r EnableOutOfBandManagementForZoneResponse 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 *ZoneService) EnableOutOfBandManagementForZone(p *EnableOutOfBandManagementForZoneParams) (*EnableOutOfBandManagementForZoneResponse, error) { resp, err := s.cs.newRequest("enableOutOfBandManagementForZone", p.toURLValues()) if err != nil { return nil, err } var r EnableOutOfBandManagementForZoneResponse 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", "*", "ZoneService", ")", "EnableOutOfBandManagementForZone", "(", "p", "*", "EnableOutOfBandManagementForZoneParams", ")", "(", "*", "EnableOutOfBandManagementForZoneResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "EnableOutOfBandManagementForZoneResponse", "\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 out-of-band management for a zone
[ "Enables", "out", "-", "of", "-", "band", "management", "for", "a", "zone" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L549-L581
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
NewListDedicatedZonesParams
func (s *ZoneService) NewListDedicatedZonesParams() *ListDedicatedZonesParams { p := &ListDedicatedZonesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *ZoneService) NewListDedicatedZonesParams() *ListDedicatedZonesParams { p := &ListDedicatedZonesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "ZoneService", ")", "NewListDedicatedZonesParams", "(", ")", "*", "ListDedicatedZonesParams", "{", "p", ":=", "&", "ListDedicatedZonesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListDedicatedZonesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListDedicatedZonesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L691-L695
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
ListDedicatedZones
func (s *ZoneService) ListDedicatedZones(p *ListDedicatedZonesParams) (*ListDedicatedZonesResponse, error) { resp, err := s.cs.newRequest("listDedicatedZones", p.toURLValues()) if err != nil { return nil, err } var r ListDedicatedZonesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *ZoneService) ListDedicatedZones(p *ListDedicatedZonesParams) (*ListDedicatedZonesResponse, error) { resp, err := s.cs.newRequest("listDedicatedZones", p.toURLValues()) if err != nil { return nil, err } var r ListDedicatedZonesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "ZoneService", ")", "ListDedicatedZones", "(", "p", "*", "ListDedicatedZonesParams", ")", "(", "*", "ListDedicatedZonesResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListDedicatedZonesResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// List dedicated zones.
[ "List", "dedicated", "zones", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L698-L710
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
NewListZonesParams
func (s *ZoneService) NewListZonesParams() *ListZonesParams { p := &ListZonesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *ZoneService) NewListZonesParams() *ListZonesParams { p := &ListZonesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "ZoneService", ")", "NewListZonesParams", "(", ")", "*", "ListZonesParams", "{", "p", ":=", "&", "ListZonesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListZonesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListZonesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L859-L863
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
NewReleaseDedicatedZoneParams
func (s *ZoneService) NewReleaseDedicatedZoneParams(zoneid string) *ReleaseDedicatedZoneParams { p := &ReleaseDedicatedZoneParams{} p.p = make(map[string]interface{}) p.p["zoneid"] = zoneid return p }
go
func (s *ZoneService) NewReleaseDedicatedZoneParams(zoneid string) *ReleaseDedicatedZoneParams { p := &ReleaseDedicatedZoneParams{} p.p = make(map[string]interface{}) p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "ZoneService", ")", "NewReleaseDedicatedZoneParams", "(", "zoneid", "string", ")", "*", "ReleaseDedicatedZoneParams", "{", "p", ":=", "&", "ReleaseDedicatedZoneParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ReleaseDedicatedZoneParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ReleaseDedicatedZoneParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L1034-L1039
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
ReleaseDedicatedZone
func (s *ZoneService) ReleaseDedicatedZone(p *ReleaseDedicatedZoneParams) (*ReleaseDedicatedZoneResponse, error) { resp, err := s.cs.newRequest("releaseDedicatedZone", p.toURLValues()) if err != nil { return nil, err } var r ReleaseDedicatedZoneResponse 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 *ZoneService) ReleaseDedicatedZone(p *ReleaseDedicatedZoneParams) (*ReleaseDedicatedZoneResponse, error) { resp, err := s.cs.newRequest("releaseDedicatedZone", p.toURLValues()) if err != nil { return nil, err } var r ReleaseDedicatedZoneResponse 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", "*", "ZoneService", ")", "ReleaseDedicatedZone", "(", "p", "*", "ReleaseDedicatedZoneParams", ")", "(", "*", "ReleaseDedicatedZoneResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ReleaseDedicatedZoneResponse", "\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", "}" ]
// Release dedication of zone
[ "Release", "dedication", "of", "zone" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L1042-L1069
train
xanzy/go-cloudstack
cloudstack/ZoneService.go
NewUpdateZoneParams
func (s *ZoneService) NewUpdateZoneParams(id string) *UpdateZoneParams { p := &UpdateZoneParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *ZoneService) NewUpdateZoneParams(id string) *UpdateZoneParams { p := &UpdateZoneParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "ZoneService", ")", "NewUpdateZoneParams", "(", "id", "string", ")", "*", "UpdateZoneParams", "{", "p", ":=", "&", "UpdateZoneParams", "{", "}", "\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 UpdateZoneParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateZoneParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ZoneService.go#L1274-L1279
train
xanzy/go-cloudstack
cloudstack/OvsElementService.go
NewConfigureOvsElementParams
func (s *OvsElementService) NewConfigureOvsElementParams(enabled bool, id string) *ConfigureOvsElementParams { p := &ConfigureOvsElementParams{} p.p = make(map[string]interface{}) p.p["enabled"] = enabled p.p["id"] = id return p }
go
func (s *OvsElementService) NewConfigureOvsElementParams(enabled bool, id string) *ConfigureOvsElementParams { p := &ConfigureOvsElementParams{} p.p = make(map[string]interface{}) p.p["enabled"] = enabled p.p["id"] = id return p }
[ "func", "(", "s", "*", "OvsElementService", ")", "NewConfigureOvsElementParams", "(", "enabled", "bool", ",", "id", "string", ")", "*", "ConfigureOvsElementParams", "{", "p", ":=", "&", "ConfigureOvsElementParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "enabled", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ConfigureOvsElementParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ConfigureOvsElementParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/OvsElementService.go#L64-L70
train
xanzy/go-cloudstack
cloudstack/OvsElementService.go
ConfigureOvsElement
func (s *OvsElementService) ConfigureOvsElement(p *ConfigureOvsElementParams) (*OvsElementResponse, error) { resp, err := s.cs.newRequest("configureOvsElement", p.toURLValues()) if err != nil { return nil, err } var r OvsElementResponse 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 *OvsElementService) ConfigureOvsElement(p *ConfigureOvsElementParams) (*OvsElementResponse, error) { resp, err := s.cs.newRequest("configureOvsElement", p.toURLValues()) if err != nil { return nil, err } var r OvsElementResponse 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", "*", "OvsElementService", ")", "ConfigureOvsElement", "(", "p", "*", "ConfigureOvsElementParams", ")", "(", "*", "OvsElementResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "OvsElementResponse", "\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 an ovs element.
[ "Configures", "an", "ovs", "element", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/OvsElementService.go#L73-L105
train
xanzy/go-cloudstack
cloudstack/OvsElementService.go
NewListOvsElementsParams
func (s *OvsElementService) NewListOvsElementsParams() *ListOvsElementsParams { p := &ListOvsElementsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *OvsElementService) NewListOvsElementsParams() *ListOvsElementsParams { p := &ListOvsElementsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "OvsElementService", ")", "NewListOvsElementsParams", "(", ")", "*", "ListOvsElementsParams", "{", "p", ":=", "&", "ListOvsElementsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListOvsElementsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListOvsElementsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/OvsElementService.go#L202-L206
train
xanzy/go-cloudstack
cloudstack/OvsElementService.go
ListOvsElements
func (s *OvsElementService) ListOvsElements(p *ListOvsElementsParams) (*ListOvsElementsResponse, error) { resp, err := s.cs.newRequest("listOvsElements", p.toURLValues()) if err != nil { return nil, err } var r ListOvsElementsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *OvsElementService) ListOvsElements(p *ListOvsElementsParams) (*ListOvsElementsResponse, error) { resp, err := s.cs.newRequest("listOvsElements", p.toURLValues()) if err != nil { return nil, err } var r ListOvsElementsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "OvsElementService", ")", "ListOvsElements", "(", "p", "*", "ListOvsElementsParams", ")", "(", "*", "ListOvsElementsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListOvsElementsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists all available ovs elements.
[ "Lists", "all", "available", "ovs", "elements", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/OvsElementService.go#L242-L254
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
NewChangeServiceForSystemVmParams
func (s *SystemVMService) NewChangeServiceForSystemVmParams(id string, serviceofferingid string) *ChangeServiceForSystemVmParams { p := &ChangeServiceForSystemVmParams{} p.p = make(map[string]interface{}) p.p["id"] = id p.p["serviceofferingid"] = serviceofferingid return p }
go
func (s *SystemVMService) NewChangeServiceForSystemVmParams(id string, serviceofferingid string) *ChangeServiceForSystemVmParams { p := &ChangeServiceForSystemVmParams{} p.p = make(map[string]interface{}) p.p["id"] = id p.p["serviceofferingid"] = serviceofferingid return p }
[ "func", "(", "s", "*", "SystemVMService", ")", "NewChangeServiceForSystemVmParams", "(", "id", "string", ",", "serviceofferingid", "string", ")", "*", "ChangeServiceForSystemVmParams", "{", "p", ":=", "&", "ChangeServiceForSystemVmParams", "{", "}", "\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 ChangeServiceForSystemVmParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ChangeServiceForSystemVmParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L78-L84
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
NewDestroySystemVmParams
func (s *SystemVMService) NewDestroySystemVmParams(id string) *DestroySystemVmParams { p := &DestroySystemVmParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *SystemVMService) NewDestroySystemVmParams(id string) *DestroySystemVmParams { p := &DestroySystemVmParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "SystemVMService", ")", "NewDestroySystemVmParams", "(", "id", "string", ")", "*", "DestroySystemVmParams", "{", "p", ":=", "&", "DestroySystemVmParams", "{", "}", "\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 DestroySystemVmParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DestroySystemVmParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L159-L164
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
DestroySystemVm
func (s *SystemVMService) DestroySystemVm(p *DestroySystemVmParams) (*DestroySystemVmResponse, error) { resp, err := s.cs.newRequest("destroySystemVm", p.toURLValues()) if err != nil { return nil, err } var r DestroySystemVmResponse 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) DestroySystemVm(p *DestroySystemVmParams) (*DestroySystemVmResponse, error) { resp, err := s.cs.newRequest("destroySystemVm", p.toURLValues()) if err != nil { return nil, err } var r DestroySystemVmResponse 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", ")", "DestroySystemVm", "(", "p", "*", "DestroySystemVmParams", ")", "(", "*", "DestroySystemVmResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DestroySystemVmResponse", "\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", "}" ]
// Destroyes a system virtual machine.
[ "Destroyes", "a", "system", "virtual", "machine", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L167-L199
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
NewListSystemVmsParams
func (s *SystemVMService) NewListSystemVmsParams() *ListSystemVmsParams { p := &ListSystemVmsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *SystemVMService) NewListSystemVmsParams() *ListSystemVmsParams { p := &ListSystemVmsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "SystemVMService", ")", "NewListSystemVmsParams", "(", ")", "*", "ListSystemVmsParams", "{", "p", ":=", "&", "ListSystemVmsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListSystemVmsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListSystemVmsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L371-L375
train