id
int32
0
167k
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
listlengths
21
1.41k
docstring
stringlengths
6
2.61k
docstring_tokens
listlengths
3
215
sha
stringlengths
40
40
url
stringlengths
85
252
145,500
xanzy/go-cloudstack
cloudstack/TemplateService.go
NewDeleteTemplateParams
func (s *TemplateService) NewDeleteTemplateParams(id string) *DeleteTemplateParams { p := &DeleteTemplateParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *TemplateService) NewDeleteTemplateParams(id string) *DeleteTemplateParams { p := &DeleteTemplateParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "TemplateService", ")", "NewDeleteTemplateParams", "(", "id", "string", ")", "*", "DeleteTemplateParams", "{", "p", ":=", "&", "DeleteTemplateParams", "{", "}", "\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 DeleteTemplateParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteTemplateParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L508-L513
145,501
xanzy/go-cloudstack
cloudstack/TemplateService.go
NewExtractTemplateParams
func (s *TemplateService) NewExtractTemplateParams(id string, mode string) *ExtractTemplateParams { p := &ExtractTemplateParams{} p.p = make(map[string]interface{}) p.p["id"] = id p.p["mode"] = mode return p }
go
func (s *TemplateService) NewExtractTemplateParams(id string, mode string) *ExtractTemplateParams { p := &ExtractTemplateParams{} p.p = make(map[string]interface{}) p.p["id"] = id p.p["mode"] = mode return p }
[ "func", "(", "s", "*", "TemplateService", ")", "NewExtractTemplateParams", "(", "id", "string", ",", "mode", "string", ")", "*", "ExtractTemplateParams", "{", "p", ":=", "&", "ExtractTemplateParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "mode", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ExtractTemplateParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ExtractTemplateParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L609-L615
145,502
xanzy/go-cloudstack
cloudstack/TemplateService.go
NewGetUploadParamsForTemplateParams
func (s *TemplateService) NewGetUploadParamsForTemplateParams(displaytext string, format string, hypervisor string, name string, ostypeid string, zoneid string) *GetUploadParamsForTemplateParams { p := &GetUploadParamsForTemplateParams{} p.p = make(map[string]interface{}) p.p["displaytext"] = displaytext p.p["format"] = format p.p["hypervisor"] = hypervisor p.p["name"] = name p.p["ostypeid"] = ostypeid p.p["zoneid"] = zoneid return p }
go
func (s *TemplateService) NewGetUploadParamsForTemplateParams(displaytext string, format string, hypervisor string, name string, ostypeid string, zoneid string) *GetUploadParamsForTemplateParams { p := &GetUploadParamsForTemplateParams{} p.p = make(map[string]interface{}) p.p["displaytext"] = displaytext p.p["format"] = format p.p["hypervisor"] = hypervisor p.p["name"] = name p.p["ostypeid"] = ostypeid p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "TemplateService", ")", "NewGetUploadParamsForTemplateParams", "(", "displaytext", "string", ",", "format", "string", ",", "hypervisor", "string", ",", "name", "string", ",", "ostypeid", "string", ",", "zoneid", "string", ")", "*", "GetUploadParamsForTemplateParams", "{", "p", ":=", "&", "GetUploadParamsForTemplateParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "displaytext", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "format", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "hypervisor", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "ostypeid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new GetUploadParamsForTemplateParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "GetUploadParamsForTemplateParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L928-L938
145,503
xanzy/go-cloudstack
cloudstack/TemplateService.go
GetUploadParamsForTemplate
func (s *TemplateService) GetUploadParamsForTemplate(p *GetUploadParamsForTemplateParams) (*GetUploadParamsForTemplateResponse, error) { resp, err := s.cs.newRequest("getUploadParamsForTemplate", p.toURLValues()) if err != nil { return nil, err } var r GetUploadParamsForTemplateResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *TemplateService) GetUploadParamsForTemplate(p *GetUploadParamsForTemplateParams) (*GetUploadParamsForTemplateResponse, error) { resp, err := s.cs.newRequest("getUploadParamsForTemplate", p.toURLValues()) if err != nil { return nil, err } var r GetUploadParamsForTemplateResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "TemplateService", ")", "GetUploadParamsForTemplate", "(", "p", "*", "GetUploadParamsForTemplateParams", ")", "(", "*", "GetUploadParamsForTemplateResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "GetUploadParamsForTemplateResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// upload an existing template into the CloudStack cloud.
[ "upload", "an", "existing", "template", "into", "the", "CloudStack", "cloud", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L941-L953
145,504
xanzy/go-cloudstack
cloudstack/TemplateService.go
NewListTemplatePermissionsParams
func (s *TemplateService) NewListTemplatePermissionsParams(id string) *ListTemplatePermissionsParams { p := &ListTemplatePermissionsParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *TemplateService) NewListTemplatePermissionsParams(id string) *ListTemplatePermissionsParams { p := &ListTemplatePermissionsParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "TemplateService", ")", "NewListTemplatePermissionsParams", "(", "id", "string", ")", "*", "ListTemplatePermissionsParams", "{", "p", ":=", "&", "ListTemplatePermissionsParams", "{", "}", "\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 ListTemplatePermissionsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListTemplatePermissionsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L988-L993
145,505
xanzy/go-cloudstack
cloudstack/TemplateService.go
NewListTemplatesParams
func (s *TemplateService) NewListTemplatesParams(templatefilter string) *ListTemplatesParams { p := &ListTemplatesParams{} p.p = make(map[string]interface{}) p.p["templatefilter"] = templatefilter return p }
go
func (s *TemplateService) NewListTemplatesParams(templatefilter string) *ListTemplatesParams { p := &ListTemplatesParams{} p.p = make(map[string]interface{}) p.p["templatefilter"] = templatefilter return p }
[ "func", "(", "s", "*", "TemplateService", ")", "NewListTemplatesParams", "(", "templatefilter", "string", ")", "*", "ListTemplatesParams", "{", "p", ":=", "&", "ListTemplatesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "templatefilter", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListTemplatesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListTemplatesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L1268-L1273
145,506
xanzy/go-cloudstack
cloudstack/TemplateService.go
NewPrepareTemplateParams
func (s *TemplateService) NewPrepareTemplateParams(templateid string, zoneid string) *PrepareTemplateParams { p := &PrepareTemplateParams{} p.p = make(map[string]interface{}) p.p["templateid"] = templateid p.p["zoneid"] = zoneid return p }
go
func (s *TemplateService) NewPrepareTemplateParams(templateid string, zoneid string) *PrepareTemplateParams { p := &PrepareTemplateParams{} p.p = make(map[string]interface{}) p.p["templateid"] = templateid p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "TemplateService", ")", "NewPrepareTemplateParams", "(", "templateid", "string", ",", "zoneid", "string", ")", "*", "PrepareTemplateParams", "{", "p", ":=", "&", "PrepareTemplateParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "templateid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new PrepareTemplateParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "PrepareTemplateParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L1471-L1477
145,507
xanzy/go-cloudstack
cloudstack/TemplateService.go
NewRegisterTemplateParams
func (s *TemplateService) NewRegisterTemplateParams(displaytext string, format string, hypervisor string, name string, ostypeid string, url string) *RegisterTemplateParams { p := &RegisterTemplateParams{} p.p = make(map[string]interface{}) p.p["displaytext"] = displaytext p.p["format"] = format p.p["hypervisor"] = hypervisor p.p["name"] = name p.p["ostypeid"] = ostypeid p.p["url"] = url return p }
go
func (s *TemplateService) NewRegisterTemplateParams(displaytext string, format string, hypervisor string, name string, ostypeid string, url string) *RegisterTemplateParams { p := &RegisterTemplateParams{} p.p = make(map[string]interface{}) p.p["displaytext"] = displaytext p.p["format"] = format p.p["hypervisor"] = hypervisor p.p["name"] = name p.p["ostypeid"] = ostypeid p.p["url"] = url return p }
[ "func", "(", "s", "*", "TemplateService", ")", "NewRegisterTemplateParams", "(", "displaytext", "string", ",", "format", "string", ",", "hypervisor", "string", ",", "name", "string", ",", "ostypeid", "string", ",", "url", "string", ")", "*", "RegisterTemplateParams", "{", "p", ":=", "&", "RegisterTemplateParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "displaytext", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "format", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "hypervisor", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "ostypeid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "url", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new RegisterTemplateParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "RegisterTemplateParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L1830-L1840
145,508
xanzy/go-cloudstack
cloudstack/TemplateService.go
NewUpdateTemplateParams
func (s *TemplateService) NewUpdateTemplateParams(id string) *UpdateTemplateParams { p := &UpdateTemplateParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *TemplateService) NewUpdateTemplateParams(id string) *UpdateTemplateParams { p := &UpdateTemplateParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "TemplateService", ")", "NewUpdateTemplateParams", "(", "id", "string", ")", "*", "UpdateTemplateParams", "{", "p", ":=", "&", "UpdateTemplateParams", "{", "}", "\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 UpdateTemplateParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateTemplateParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L2073-L2078
145,509
xanzy/go-cloudstack
cloudstack/TemplateService.go
NewUpdateTemplatePermissionsParams
func (s *TemplateService) NewUpdateTemplatePermissionsParams(id string) *UpdateTemplatePermissionsParams { p := &UpdateTemplatePermissionsParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *TemplateService) NewUpdateTemplatePermissionsParams(id string) *UpdateTemplatePermissionsParams { p := &UpdateTemplatePermissionsParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "TemplateService", ")", "NewUpdateTemplatePermissionsParams", "(", "id", "string", ")", "*", "UpdateTemplatePermissionsParams", "{", "p", ":=", "&", "UpdateTemplatePermissionsParams", "{", "}", "\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 UpdateTemplatePermissionsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateTemplatePermissionsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L2234-L2239
145,510
xanzy/go-cloudstack
cloudstack/TemplateService.go
NewUpgradeRouterTemplateParams
func (s *TemplateService) NewUpgradeRouterTemplateParams() *UpgradeRouterTemplateParams { p := &UpgradeRouterTemplateParams{} p.p = make(map[string]interface{}) return p }
go
func (s *TemplateService) NewUpgradeRouterTemplateParams() *UpgradeRouterTemplateParams { p := &UpgradeRouterTemplateParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "TemplateService", ")", "NewUpgradeRouterTemplateParams", "(", ")", "*", "UpgradeRouterTemplateParams", "{", "p", ":=", "&", "UpgradeRouterTemplateParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UpgradeRouterTemplateParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpgradeRouterTemplateParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L2360-L2364
145,511
xanzy/go-cloudstack
cloudstack/TemplateService.go
UpgradeRouterTemplate
func (s *TemplateService) UpgradeRouterTemplate(p *UpgradeRouterTemplateParams) (*UpgradeRouterTemplateResponse, error) { resp, err := s.cs.newRequest("upgradeRouterTemplate", p.toURLValues()) if err != nil { return nil, err } var r UpgradeRouterTemplateResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *TemplateService) UpgradeRouterTemplate(p *UpgradeRouterTemplateParams) (*UpgradeRouterTemplateResponse, error) { resp, err := s.cs.newRequest("upgradeRouterTemplate", p.toURLValues()) if err != nil { return nil, err } var r UpgradeRouterTemplateResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "TemplateService", ")", "UpgradeRouterTemplate", "(", "p", "*", "UpgradeRouterTemplateParams", ")", "(", "*", "UpgradeRouterTemplateResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpgradeRouterTemplateResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Upgrades router to use newer template
[ "Upgrades", "router", "to", "use", "newer", "template" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L2367-L2379
145,512
xanzy/go-cloudstack
cloudstack/AsyncjobService.go
NewListAsyncJobsParams
func (s *AsyncjobService) NewListAsyncJobsParams() *ListAsyncJobsParams { p := &ListAsyncJobsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *AsyncjobService) NewListAsyncJobsParams() *ListAsyncJobsParams { p := &ListAsyncJobsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "AsyncjobService", ")", "NewListAsyncJobsParams", "(", ")", "*", "ListAsyncJobsParams", "{", "p", ":=", "&", "ListAsyncJobsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListAsyncJobsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListAsyncJobsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AsyncjobService.go#L132-L136
145,513
xanzy/go-cloudstack
cloudstack/AsyncjobService.go
ListAsyncJobs
func (s *AsyncjobService) ListAsyncJobs(p *ListAsyncJobsParams) (*ListAsyncJobsResponse, error) { resp, err := s.cs.newRequest("listAsyncJobs", p.toURLValues()) if err != nil { return nil, err } var r ListAsyncJobsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *AsyncjobService) ListAsyncJobs(p *ListAsyncJobsParams) (*ListAsyncJobsResponse, error) { resp, err := s.cs.newRequest("listAsyncJobs", p.toURLValues()) if err != nil { return nil, err } var r ListAsyncJobsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "AsyncjobService", ")", "ListAsyncJobs", "(", "p", "*", "ListAsyncJobsParams", ")", "(", "*", "ListAsyncJobsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListAsyncJobsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists all pending asynchronous jobs for the account.
[ "Lists", "all", "pending", "asynchronous", "jobs", "for", "the", "account", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AsyncjobService.go#L139-L151
145,514
xanzy/go-cloudstack
cloudstack/AsyncjobService.go
NewQueryAsyncJobResultParams
func (s *AsyncjobService) NewQueryAsyncJobResultParams(jobid string) *QueryAsyncJobResultParams { p := &QueryAsyncJobResultParams{} p.p = make(map[string]interface{}) p.p["jobid"] = jobid return p }
go
func (s *AsyncjobService) NewQueryAsyncJobResultParams(jobid string) *QueryAsyncJobResultParams { p := &QueryAsyncJobResultParams{} p.p = make(map[string]interface{}) p.p["jobid"] = jobid return p }
[ "func", "(", "s", "*", "AsyncjobService", ")", "NewQueryAsyncJobResultParams", "(", "jobid", "string", ")", "*", "QueryAsyncJobResultParams", "{", "p", ":=", "&", "QueryAsyncJobResultParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "jobid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new QueryAsyncJobResultParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "QueryAsyncJobResultParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AsyncjobService.go#L197-L202
145,515
xanzy/go-cloudstack
cloudstack/AsyncjobService.go
QueryAsyncJobResult
func (s *AsyncjobService) QueryAsyncJobResult(p *QueryAsyncJobResultParams) (*QueryAsyncJobResultResponse, error) { var resp json.RawMessage var err error // We should be able to retry on failure as this call is idempotent for i := 0; i < 3; i++ { resp, err = s.cs.newRequest("queryAsyncJobResult", p.toURLValues()) if err == nil { break } time.Sleep(500 * time.Millisecond) } if err != nil { return nil, err } var r QueryAsyncJobResultResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *AsyncjobService) QueryAsyncJobResult(p *QueryAsyncJobResultParams) (*QueryAsyncJobResultResponse, error) { var resp json.RawMessage var err error // We should be able to retry on failure as this call is idempotent for i := 0; i < 3; i++ { resp, err = s.cs.newRequest("queryAsyncJobResult", p.toURLValues()) if err == nil { break } time.Sleep(500 * time.Millisecond) } if err != nil { return nil, err } var r QueryAsyncJobResultResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "AsyncjobService", ")", "QueryAsyncJobResult", "(", "p", "*", "QueryAsyncJobResultParams", ")", "(", "*", "QueryAsyncJobResultResponse", ",", "error", ")", "{", "var", "resp", "json", ".", "RawMessage", "\n", "var", "err", "error", "\n\n", "// We should be able to retry on failure as this call is idempotent", "for", "i", ":=", "0", ";", "i", "<", "3", ";", "i", "++", "{", "resp", ",", "err", "=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "==", "nil", "{", "break", "\n", "}", "\n", "time", ".", "Sleep", "(", "500", "*", "time", ".", "Millisecond", ")", "\n", "}", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "QueryAsyncJobResultResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Retrieves the current status of asynchronous job.
[ "Retrieves", "the", "current", "status", "of", "asynchronous", "job", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AsyncjobService.go#L205-L227
145,516
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
NewCreateNetworkACLParams
func (s *NetworkACLService) NewCreateNetworkACLParams(protocol string) *CreateNetworkACLParams { p := &CreateNetworkACLParams{} p.p = make(map[string]interface{}) p.p["protocol"] = protocol return p }
go
func (s *NetworkACLService) NewCreateNetworkACLParams(protocol string) *CreateNetworkACLParams { p := &CreateNetworkACLParams{} p.p = make(map[string]interface{}) p.p["protocol"] = protocol return p }
[ "func", "(", "s", "*", "NetworkACLService", ")", "NewCreateNetworkACLParams", "(", "protocol", "string", ")", "*", "CreateNetworkACLParams", "{", "p", ":=", "&", "CreateNetworkACLParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "protocol", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateNetworkACLParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateNetworkACLParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L180-L185
145,517
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
NewCreateNetworkACLListParams
func (s *NetworkACLService) NewCreateNetworkACLListParams(name string, vpcid string) *CreateNetworkACLListParams { p := &CreateNetworkACLListParams{} p.p = make(map[string]interface{}) p.p["name"] = name p.p["vpcid"] = vpcid return p }
go
func (s *NetworkACLService) NewCreateNetworkACLListParams(name string, vpcid string) *CreateNetworkACLListParams { p := &CreateNetworkACLListParams{} p.p = make(map[string]interface{}) p.p["name"] = name p.p["vpcid"] = vpcid return p }
[ "func", "(", "s", "*", "NetworkACLService", ")", "NewCreateNetworkACLListParams", "(", "name", "string", ",", "vpcid", "string", ")", "*", "CreateNetworkACLListParams", "{", "p", ":=", "&", "CreateNetworkACLListParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "vpcid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateNetworkACLListParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateNetworkACLListParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L299-L305
145,518
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
CreateNetworkACLList
func (s *NetworkACLService) CreateNetworkACLList(p *CreateNetworkACLListParams) (*CreateNetworkACLListResponse, error) { resp, err := s.cs.newRequest("createNetworkACLList", p.toURLValues()) if err != nil { return nil, err } var r CreateNetworkACLListResponse 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 *NetworkACLService) CreateNetworkACLList(p *CreateNetworkACLListParams) (*CreateNetworkACLListResponse, error) { resp, err := s.cs.newRequest("createNetworkACLList", p.toURLValues()) if err != nil { return nil, err } var r CreateNetworkACLListResponse 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", "*", "NetworkACLService", ")", "CreateNetworkACLList", "(", "p", "*", "CreateNetworkACLListParams", ")", "(", "*", "CreateNetworkACLListResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateNetworkACLListResponse", "\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 network ACL for the given VPC
[ "Creates", "a", "network", "ACL", "for", "the", "given", "VPC" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L308-L340
145,519
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
NewDeleteNetworkACLParams
func (s *NetworkACLService) NewDeleteNetworkACLParams(id string) *DeleteNetworkACLParams { p := &DeleteNetworkACLParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *NetworkACLService) NewDeleteNetworkACLParams(id string) *DeleteNetworkACLParams { p := &DeleteNetworkACLParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "NetworkACLService", ")", "NewDeleteNetworkACLParams", "(", "id", "string", ")", "*", "DeleteNetworkACLParams", "{", "p", ":=", "&", "DeleteNetworkACLParams", "{", "}", "\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 DeleteNetworkACLParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteNetworkACLParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L376-L381
145,520
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
NewDeleteNetworkACLListParams
func (s *NetworkACLService) NewDeleteNetworkACLListParams(id string) *DeleteNetworkACLListParams { p := &DeleteNetworkACLListParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *NetworkACLService) NewDeleteNetworkACLListParams(id string) *DeleteNetworkACLListParams { p := &DeleteNetworkACLListParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "NetworkACLService", ")", "NewDeleteNetworkACLListParams", "(", "id", "string", ")", "*", "DeleteNetworkACLListParams", "{", "p", ":=", "&", "DeleteNetworkACLListParams", "{", "}", "\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 DeleteNetworkACLListParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteNetworkACLListParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L444-L449
145,521
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
NewListNetworkACLListsParams
func (s *NetworkACLService) NewListNetworkACLListsParams() *ListNetworkACLListsParams { p := &ListNetworkACLListsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *NetworkACLService) NewListNetworkACLListsParams() *ListNetworkACLListsParams { p := &ListNetworkACLListsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "NetworkACLService", ")", "NewListNetworkACLListsParams", "(", ")", "*", "ListNetworkACLListsParams", "{", "p", ":=", "&", "ListNetworkACLListsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListNetworkACLListsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListNetworkACLListsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L649-L653
145,522
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
ListNetworkACLLists
func (s *NetworkACLService) ListNetworkACLLists(p *ListNetworkACLListsParams) (*ListNetworkACLListsResponse, error) { resp, err := s.cs.newRequest("listNetworkACLLists", p.toURLValues()) if err != nil { return nil, err } var r ListNetworkACLListsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *NetworkACLService) ListNetworkACLLists(p *ListNetworkACLListsParams) (*ListNetworkACLListsResponse, error) { resp, err := s.cs.newRequest("listNetworkACLLists", p.toURLValues()) if err != nil { return nil, err } var r ListNetworkACLListsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "NetworkACLService", ")", "ListNetworkACLLists", "(", "p", "*", "ListNetworkACLListsParams", ")", "(", "*", "ListNetworkACLListsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListNetworkACLListsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists all network ACLs
[ "Lists", "all", "network", "ACLs" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L739-L751
145,523
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
NewListNetworkACLsParams
func (s *NetworkACLService) NewListNetworkACLsParams() *ListNetworkACLsParams { p := &ListNetworkACLsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *NetworkACLService) NewListNetworkACLsParams() *ListNetworkACLsParams { p := &ListNetworkACLsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "NetworkACLService", ")", "NewListNetworkACLsParams", "(", ")", "*", "ListNetworkACLsParams", "{", "p", ":=", "&", "ListNetworkACLsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListNetworkACLsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListNetworkACLsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L966-L970
145,524
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
ListNetworkACLs
func (s *NetworkACLService) ListNetworkACLs(p *ListNetworkACLsParams) (*ListNetworkACLsResponse, error) { resp, err := s.cs.newRequest("listNetworkACLs", p.toURLValues()) if err != nil { return nil, err } var r ListNetworkACLsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *NetworkACLService) ListNetworkACLs(p *ListNetworkACLsParams) (*ListNetworkACLsResponse, error) { resp, err := s.cs.newRequest("listNetworkACLs", p.toURLValues()) if err != nil { return nil, err } var r ListNetworkACLsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "NetworkACLService", ")", "ListNetworkACLs", "(", "p", "*", "ListNetworkACLsParams", ")", "(", "*", "ListNetworkACLsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListNetworkACLsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists all network ACL items
[ "Lists", "all", "network", "ACL", "items" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L1006-L1018
145,525
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
NewReplaceNetworkACLListParams
func (s *NetworkACLService) NewReplaceNetworkACLListParams(aclid string) *ReplaceNetworkACLListParams { p := &ReplaceNetworkACLListParams{} p.p = make(map[string]interface{}) p.p["aclid"] = aclid return p }
go
func (s *NetworkACLService) NewReplaceNetworkACLListParams(aclid string) *ReplaceNetworkACLListParams { p := &ReplaceNetworkACLListParams{} p.p = make(map[string]interface{}) p.p["aclid"] = aclid return p }
[ "func", "(", "s", "*", "NetworkACLService", ")", "NewReplaceNetworkACLListParams", "(", "aclid", "string", ")", "*", "ReplaceNetworkACLListParams", "{", "p", ":=", "&", "ReplaceNetworkACLListParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "aclid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ReplaceNetworkACLListParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ReplaceNetworkACLListParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L1089-L1094
145,526
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
ReplaceNetworkACLList
func (s *NetworkACLService) ReplaceNetworkACLList(p *ReplaceNetworkACLListParams) (*ReplaceNetworkACLListResponse, error) { resp, err := s.cs.newRequest("replaceNetworkACLList", p.toURLValues()) if err != nil { return nil, err } var r ReplaceNetworkACLListResponse 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 *NetworkACLService) ReplaceNetworkACLList(p *ReplaceNetworkACLListParams) (*ReplaceNetworkACLListResponse, error) { resp, err := s.cs.newRequest("replaceNetworkACLList", p.toURLValues()) if err != nil { return nil, err } var r ReplaceNetworkACLListResponse 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", "*", "NetworkACLService", ")", "ReplaceNetworkACLList", "(", "p", "*", "ReplaceNetworkACLListParams", ")", "(", "*", "ReplaceNetworkACLListResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ReplaceNetworkACLListResponse", "\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", "}" ]
// Replaces ACL associated with a network or private gateway
[ "Replaces", "ACL", "associated", "with", "a", "network", "or", "private", "gateway" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L1097-L1124
145,527
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
NewUpdateNetworkACLItemParams
func (s *NetworkACLService) NewUpdateNetworkACLItemParams(id string) *UpdateNetworkACLItemParams { p := &UpdateNetworkACLItemParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *NetworkACLService) NewUpdateNetworkACLItemParams(id string) *UpdateNetworkACLItemParams { p := &UpdateNetworkACLItemParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "NetworkACLService", ")", "NewUpdateNetworkACLItemParams", "(", "id", "string", ")", "*", "UpdateNetworkACLItemParams", "{", "p", ":=", "&", "UpdateNetworkACLItemParams", "{", "}", "\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 UpdateNetworkACLItemParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateNetworkACLItemParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L1285-L1290
145,528
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
UpdateNetworkACLItem
func (s *NetworkACLService) UpdateNetworkACLItem(p *UpdateNetworkACLItemParams) (*UpdateNetworkACLItemResponse, error) { resp, err := s.cs.newRequest("updateNetworkACLItem", p.toURLValues()) if err != nil { return nil, err } var r UpdateNetworkACLItemResponse 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 *NetworkACLService) UpdateNetworkACLItem(p *UpdateNetworkACLItemParams) (*UpdateNetworkACLItemResponse, error) { resp, err := s.cs.newRequest("updateNetworkACLItem", p.toURLValues()) if err != nil { return nil, err } var r UpdateNetworkACLItemResponse 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", "*", "NetworkACLService", ")", "UpdateNetworkACLItem", "(", "p", "*", "UpdateNetworkACLItemParams", ")", "(", "*", "UpdateNetworkACLItemResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateNetworkACLItemResponse", "\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 ACL item with specified ID
[ "Updates", "ACL", "item", "with", "specified", "ID" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L1293-L1325
145,529
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
NewUpdateNetworkACLListParams
func (s *NetworkACLService) NewUpdateNetworkACLListParams(id string) *UpdateNetworkACLListParams { p := &UpdateNetworkACLListParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *NetworkACLService) NewUpdateNetworkACLListParams(id string) *UpdateNetworkACLListParams { p := &UpdateNetworkACLListParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "NetworkACLService", ")", "NewUpdateNetworkACLListParams", "(", "id", "string", ")", "*", "UpdateNetworkACLListParams", "{", "p", ":=", "&", "UpdateNetworkACLListParams", "{", "}", "\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 UpdateNetworkACLListParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateNetworkACLListParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L1393-L1398
145,530
xanzy/go-cloudstack
cloudstack/NetworkACLService.go
UpdateNetworkACLList
func (s *NetworkACLService) UpdateNetworkACLList(p *UpdateNetworkACLListParams) (*UpdateNetworkACLListResponse, error) { resp, err := s.cs.newRequest("updateNetworkACLList", p.toURLValues()) if err != nil { return nil, err } var r UpdateNetworkACLListResponse 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 *NetworkACLService) UpdateNetworkACLList(p *UpdateNetworkACLListParams) (*UpdateNetworkACLListResponse, error) { resp, err := s.cs.newRequest("updateNetworkACLList", p.toURLValues()) if err != nil { return nil, err } var r UpdateNetworkACLListResponse 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", "*", "NetworkACLService", ")", "UpdateNetworkACLList", "(", "p", "*", "UpdateNetworkACLListParams", ")", "(", "*", "UpdateNetworkACLListResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateNetworkACLListResponse", "\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", "}" ]
// Updates network ACL list
[ "Updates", "network", "ACL", "list" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkACLService.go#L1401-L1428
145,531
xanzy/go-cloudstack
cloudstack/BigSwitchBCFService.go
NewAddBigSwitchBcfDeviceParams
func (s *BigSwitchBCFService) NewAddBigSwitchBcfDeviceParams(hostname string, nat bool, password string, physicalnetworkid string, username string) *AddBigSwitchBcfDeviceParams { p := &AddBigSwitchBcfDeviceParams{} p.p = make(map[string]interface{}) p.p["hostname"] = hostname p.p["nat"] = nat p.p["password"] = password p.p["physicalnetworkid"] = physicalnetworkid p.p["username"] = username return p }
go
func (s *BigSwitchBCFService) NewAddBigSwitchBcfDeviceParams(hostname string, nat bool, password string, physicalnetworkid string, username string) *AddBigSwitchBcfDeviceParams { p := &AddBigSwitchBcfDeviceParams{} p.p = make(map[string]interface{}) p.p["hostname"] = hostname p.p["nat"] = nat p.p["password"] = password p.p["physicalnetworkid"] = physicalnetworkid p.p["username"] = username return p }
[ "func", "(", "s", "*", "BigSwitchBCFService", ")", "NewAddBigSwitchBcfDeviceParams", "(", "hostname", "string", ",", "nat", "bool", ",", "password", "string", ",", "physicalnetworkid", "string", ",", "username", "string", ")", "*", "AddBigSwitchBcfDeviceParams", "{", "p", ":=", "&", "AddBigSwitchBcfDeviceParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "hostname", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "nat", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "password", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "physicalnetworkid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "username", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AddBigSwitchBcfDeviceParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddBigSwitchBcfDeviceParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/BigSwitchBCFService.go#L95-L104
145,532
xanzy/go-cloudstack
cloudstack/BigSwitchBCFService.go
AddBigSwitchBcfDevice
func (s *BigSwitchBCFService) AddBigSwitchBcfDevice(p *AddBigSwitchBcfDeviceParams) (*AddBigSwitchBcfDeviceResponse, error) { resp, err := s.cs.newRequest("addBigSwitchBcfDevice", p.toURLValues()) if err != nil { return nil, err } var r AddBigSwitchBcfDeviceResponse 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 *BigSwitchBCFService) AddBigSwitchBcfDevice(p *AddBigSwitchBcfDeviceParams) (*AddBigSwitchBcfDeviceResponse, error) { resp, err := s.cs.newRequest("addBigSwitchBcfDevice", p.toURLValues()) if err != nil { return nil, err } var r AddBigSwitchBcfDeviceResponse 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", "*", "BigSwitchBCFService", ")", "AddBigSwitchBcfDevice", "(", "p", "*", "AddBigSwitchBcfDeviceParams", ")", "(", "*", "AddBigSwitchBcfDeviceResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "AddBigSwitchBcfDeviceResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Adds a BigSwitch BCF Controller device
[ "Adds", "a", "BigSwitch", "BCF", "Controller", "device" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/BigSwitchBCFService.go#L107-L139
145,533
xanzy/go-cloudstack
cloudstack/BigSwitchBCFService.go
NewDeleteBigSwitchBcfDeviceParams
func (s *BigSwitchBCFService) NewDeleteBigSwitchBcfDeviceParams(bcfdeviceid string) *DeleteBigSwitchBcfDeviceParams { p := &DeleteBigSwitchBcfDeviceParams{} p.p = make(map[string]interface{}) p.p["bcfdeviceid"] = bcfdeviceid return p }
go
func (s *BigSwitchBCFService) NewDeleteBigSwitchBcfDeviceParams(bcfdeviceid string) *DeleteBigSwitchBcfDeviceParams { p := &DeleteBigSwitchBcfDeviceParams{} p.p = make(map[string]interface{}) p.p["bcfdeviceid"] = bcfdeviceid return p }
[ "func", "(", "s", "*", "BigSwitchBCFService", ")", "NewDeleteBigSwitchBcfDeviceParams", "(", "bcfdeviceid", "string", ")", "*", "DeleteBigSwitchBcfDeviceParams", "{", "p", ":=", "&", "DeleteBigSwitchBcfDeviceParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "bcfdeviceid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteBigSwitchBcfDeviceParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteBigSwitchBcfDeviceParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/BigSwitchBCFService.go#L178-L183
145,534
xanzy/go-cloudstack
cloudstack/BigSwitchBCFService.go
DeleteBigSwitchBcfDevice
func (s *BigSwitchBCFService) DeleteBigSwitchBcfDevice(p *DeleteBigSwitchBcfDeviceParams) (*DeleteBigSwitchBcfDeviceResponse, error) { resp, err := s.cs.newRequest("deleteBigSwitchBcfDevice", p.toURLValues()) if err != nil { return nil, err } var r DeleteBigSwitchBcfDeviceResponse 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 *BigSwitchBCFService) DeleteBigSwitchBcfDevice(p *DeleteBigSwitchBcfDeviceParams) (*DeleteBigSwitchBcfDeviceResponse, error) { resp, err := s.cs.newRequest("deleteBigSwitchBcfDevice", p.toURLValues()) if err != nil { return nil, err } var r DeleteBigSwitchBcfDeviceResponse 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", "*", "BigSwitchBCFService", ")", "DeleteBigSwitchBcfDevice", "(", "p", "*", "DeleteBigSwitchBcfDeviceParams", ")", "(", "*", "DeleteBigSwitchBcfDeviceResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteBigSwitchBcfDeviceResponse", "\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", "}" ]
// delete a BigSwitch BCF Controller device
[ "delete", "a", "BigSwitch", "BCF", "Controller", "device" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/BigSwitchBCFService.go#L186-L213
145,535
xanzy/go-cloudstack
cloudstack/BigSwitchBCFService.go
NewListBigSwitchBcfDevicesParams
func (s *BigSwitchBCFService) NewListBigSwitchBcfDevicesParams() *ListBigSwitchBcfDevicesParams { p := &ListBigSwitchBcfDevicesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *BigSwitchBCFService) NewListBigSwitchBcfDevicesParams() *ListBigSwitchBcfDevicesParams { p := &ListBigSwitchBcfDevicesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "BigSwitchBCFService", ")", "NewListBigSwitchBcfDevicesParams", "(", ")", "*", "ListBigSwitchBcfDevicesParams", "{", "p", ":=", "&", "ListBigSwitchBcfDevicesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListBigSwitchBcfDevicesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListBigSwitchBcfDevicesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/BigSwitchBCFService.go#L292-L296
145,536
xanzy/go-cloudstack
cloudstack/BigSwitchBCFService.go
ListBigSwitchBcfDevices
func (s *BigSwitchBCFService) ListBigSwitchBcfDevices(p *ListBigSwitchBcfDevicesParams) (*ListBigSwitchBcfDevicesResponse, error) { resp, err := s.cs.newRequest("listBigSwitchBcfDevices", p.toURLValues()) if err != nil { return nil, err } var r ListBigSwitchBcfDevicesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *BigSwitchBCFService) ListBigSwitchBcfDevices(p *ListBigSwitchBcfDevicesParams) (*ListBigSwitchBcfDevicesResponse, error) { resp, err := s.cs.newRequest("listBigSwitchBcfDevices", p.toURLValues()) if err != nil { return nil, err } var r ListBigSwitchBcfDevicesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "BigSwitchBCFService", ")", "ListBigSwitchBcfDevices", "(", "p", "*", "ListBigSwitchBcfDevicesParams", ")", "(", "*", "ListBigSwitchBcfDevicesResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListBigSwitchBcfDevicesResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists BigSwitch BCF Controller devices
[ "Lists", "BigSwitch", "BCF", "Controller", "devices" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/BigSwitchBCFService.go#L299-L311
145,537
xanzy/go-cloudstack
cloudstack/ConfigurationService.go
NewListCapabilitiesParams
func (s *ConfigurationService) NewListCapabilitiesParams() *ListCapabilitiesParams { p := &ListCapabilitiesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *ConfigurationService) NewListCapabilitiesParams() *ListCapabilitiesParams { p := &ListCapabilitiesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "ConfigurationService", ")", "NewListCapabilitiesParams", "(", ")", "*", "ListCapabilitiesParams", "{", "p", ":=", "&", "ListCapabilitiesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListCapabilitiesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListCapabilitiesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ConfigurationService.go#L39-L43
145,538
xanzy/go-cloudstack
cloudstack/ConfigurationService.go
NewListConfigurationsParams
func (s *ConfigurationService) NewListConfigurationsParams() *ListConfigurationsParams { p := &ListConfigurationsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *ConfigurationService) NewListConfigurationsParams() *ListConfigurationsParams { p := &ListConfigurationsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "ConfigurationService", ")", "NewListConfigurationsParams", "(", ")", "*", "ListConfigurationsParams", "{", "p", ":=", "&", "ListConfigurationsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListConfigurationsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListConfigurationsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ConfigurationService.go#L220-L224
145,539
xanzy/go-cloudstack
cloudstack/ConfigurationService.go
ListConfigurations
func (s *ConfigurationService) ListConfigurations(p *ListConfigurationsParams) (*ListConfigurationsResponse, error) { resp, err := s.cs.newRequest("listConfigurations", p.toURLValues()) if err != nil { return nil, err } var r ListConfigurationsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *ConfigurationService) ListConfigurations(p *ListConfigurationsParams) (*ListConfigurationsResponse, error) { resp, err := s.cs.newRequest("listConfigurations", p.toURLValues()) if err != nil { return nil, err } var r ListConfigurationsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "ConfigurationService", ")", "ListConfigurations", "(", "p", "*", "ListConfigurationsParams", ")", "(", "*", "ListConfigurationsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListConfigurationsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists all configurations.
[ "Lists", "all", "configurations", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ConfigurationService.go#L227-L239
145,540
xanzy/go-cloudstack
cloudstack/ConfigurationService.go
NewListDeploymentPlannersParams
func (s *ConfigurationService) NewListDeploymentPlannersParams() *ListDeploymentPlannersParams { p := &ListDeploymentPlannersParams{} p.p = make(map[string]interface{}) return p }
go
func (s *ConfigurationService) NewListDeploymentPlannersParams() *ListDeploymentPlannersParams { p := &ListDeploymentPlannersParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "ConfigurationService", ")", "NewListDeploymentPlannersParams", "(", ")", "*", "ListDeploymentPlannersParams", "{", "p", ":=", "&", "ListDeploymentPlannersParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListDeploymentPlannersParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListDeploymentPlannersParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ConfigurationService.go#L304-L308
145,541
xanzy/go-cloudstack
cloudstack/ConfigurationService.go
ListDeploymentPlanners
func (s *ConfigurationService) ListDeploymentPlanners(p *ListDeploymentPlannersParams) (*ListDeploymentPlannersResponse, error) { resp, err := s.cs.newRequest("listDeploymentPlanners", p.toURLValues()) if err != nil { return nil, err } var r ListDeploymentPlannersResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *ConfigurationService) ListDeploymentPlanners(p *ListDeploymentPlannersParams) (*ListDeploymentPlannersResponse, error) { resp, err := s.cs.newRequest("listDeploymentPlanners", p.toURLValues()) if err != nil { return nil, err } var r ListDeploymentPlannersResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "ConfigurationService", ")", "ListDeploymentPlanners", "(", "p", "*", "ListDeploymentPlannersParams", ")", "(", "*", "ListDeploymentPlannersResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListDeploymentPlannersResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists all DeploymentPlanners available.
[ "Lists", "all", "DeploymentPlanners", "available", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ConfigurationService.go#L311-L323
145,542
xanzy/go-cloudstack
cloudstack/ConfigurationService.go
NewUpdateConfigurationParams
func (s *ConfigurationService) NewUpdateConfigurationParams(name string) *UpdateConfigurationParams { p := &UpdateConfigurationParams{} p.p = make(map[string]interface{}) p.p["name"] = name return p }
go
func (s *ConfigurationService) NewUpdateConfigurationParams(name string) *UpdateConfigurationParams { p := &UpdateConfigurationParams{} p.p = make(map[string]interface{}) p.p["name"] = name return p }
[ "func", "(", "s", "*", "ConfigurationService", ")", "NewUpdateConfigurationParams", "(", "name", "string", ")", "*", "UpdateConfigurationParams", "{", "p", ":=", "&", "UpdateConfigurationParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UpdateConfigurationParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateConfigurationParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ConfigurationService.go#L436-L441
145,543
xanzy/go-cloudstack
cloudstack/ConfigurationService.go
UpdateConfiguration
func (s *ConfigurationService) UpdateConfiguration(p *UpdateConfigurationParams) (*UpdateConfigurationResponse, error) { resp, err := s.cs.newRequest("updateConfiguration", p.toURLValues()) if err != nil { return nil, err } var r UpdateConfigurationResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *ConfigurationService) UpdateConfiguration(p *UpdateConfigurationParams) (*UpdateConfigurationResponse, error) { resp, err := s.cs.newRequest("updateConfiguration", p.toURLValues()) if err != nil { return nil, err } var r UpdateConfigurationResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "ConfigurationService", ")", "UpdateConfiguration", "(", "p", "*", "UpdateConfigurationParams", ")", "(", "*", "UpdateConfigurationResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateConfigurationResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Updates a configuration.
[ "Updates", "a", "configuration", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ConfigurationService.go#L444-L456
145,544
xanzy/go-cloudstack
cloudstack/PoolService.go
NewCreateStoragePoolParams
func (s *PoolService) NewCreateStoragePoolParams(name string, url string, zoneid string) *CreateStoragePoolParams { p := &CreateStoragePoolParams{} p.p = make(map[string]interface{}) p.p["name"] = name p.p["url"] = url p.p["zoneid"] = zoneid return p }
go
func (s *PoolService) NewCreateStoragePoolParams(name string, url string, zoneid string) *CreateStoragePoolParams { p := &CreateStoragePoolParams{} p.p = make(map[string]interface{}) p.p["name"] = name p.p["url"] = url p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "PoolService", ")", "NewCreateStoragePoolParams", "(", "name", "string", ",", "url", "string", ",", "zoneid", "string", ")", "*", "CreateStoragePoolParams", "{", "p", ":=", "&", "CreateStoragePoolParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "url", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateStoragePoolParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateStoragePoolParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/PoolService.go#L191-L198
145,545
xanzy/go-cloudstack
cloudstack/PoolService.go
NewDeleteStoragePoolParams
func (s *PoolService) NewDeleteStoragePoolParams(id string) *DeleteStoragePoolParams { p := &DeleteStoragePoolParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *PoolService) NewDeleteStoragePoolParams(id string) *DeleteStoragePoolParams { p := &DeleteStoragePoolParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "PoolService", ")", "NewDeleteStoragePoolParams", "(", "id", "string", ")", "*", "DeleteStoragePoolParams", "{", "p", ":=", "&", "DeleteStoragePoolParams", "{", "}", "\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 DeleteStoragePoolParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteStoragePoolParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/PoolService.go#L280-L285
145,546
xanzy/go-cloudstack
cloudstack/PoolService.go
NewFindStoragePoolsForMigrationParams
func (s *PoolService) NewFindStoragePoolsForMigrationParams(id string) *FindStoragePoolsForMigrationParams { p := &FindStoragePoolsForMigrationParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *PoolService) NewFindStoragePoolsForMigrationParams(id string) *FindStoragePoolsForMigrationParams { p := &FindStoragePoolsForMigrationParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "PoolService", ")", "NewFindStoragePoolsForMigrationParams", "(", "id", "string", ")", "*", "FindStoragePoolsForMigrationParams", "{", "p", ":=", "&", "FindStoragePoolsForMigrationParams", "{", "}", "\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 FindStoragePoolsForMigrationParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "FindStoragePoolsForMigrationParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/PoolService.go#L386-L391
145,547
xanzy/go-cloudstack
cloudstack/PoolService.go
NewListStoragePoolsParams
func (s *PoolService) NewListStoragePoolsParams() *ListStoragePoolsParams { p := &ListStoragePoolsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *PoolService) NewListStoragePoolsParams() *ListStoragePoolsParams { p := &ListStoragePoolsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "PoolService", ")", "NewListStoragePoolsParams", "(", ")", "*", "ListStoragePoolsParams", "{", "p", ":=", "&", "ListStoragePoolsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListStoragePoolsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListStoragePoolsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/PoolService.go#L573-L577
145,548
xanzy/go-cloudstack
cloudstack/PoolService.go
NewUpdateStoragePoolParams
func (s *PoolService) NewUpdateStoragePoolParams(id string) *UpdateStoragePoolParams { p := &UpdateStoragePoolParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *PoolService) NewUpdateStoragePoolParams(id string) *UpdateStoragePoolParams { p := &UpdateStoragePoolParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "PoolService", ")", "NewUpdateStoragePoolParams", "(", "id", "string", ")", "*", "UpdateStoragePoolParams", "{", "p", ":=", "&", "UpdateStoragePoolParams", "{", "}", "\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 UpdateStoragePoolParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateStoragePoolParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/PoolService.go#L783-L788
145,549
xanzy/go-cloudstack
cloudstack/SwiftService.go
NewAddSwiftParams
func (s *SwiftService) NewAddSwiftParams(url string) *AddSwiftParams { p := &AddSwiftParams{} p.p = make(map[string]interface{}) p.p["url"] = url return p }
go
func (s *SwiftService) NewAddSwiftParams(url string) *AddSwiftParams { p := &AddSwiftParams{} p.p = make(map[string]interface{}) p.p["url"] = url return p }
[ "func", "(", "s", "*", "SwiftService", ")", "NewAddSwiftParams", "(", "url", "string", ")", "*", "AddSwiftParams", "{", "p", ":=", "&", "AddSwiftParams", "{", "}", "\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 AddSwiftParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddSwiftParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SwiftService.go#L84-L89
145,550
xanzy/go-cloudstack
cloudstack/SwiftService.go
AddSwift
func (s *SwiftService) AddSwift(p *AddSwiftParams) (*AddSwiftResponse, error) { resp, err := s.cs.newRequest("addSwift", p.toURLValues()) if err != nil { return nil, err } var r AddSwiftResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *SwiftService) AddSwift(p *AddSwiftParams) (*AddSwiftResponse, error) { resp, err := s.cs.newRequest("addSwift", p.toURLValues()) if err != nil { return nil, err } var r AddSwiftResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "SwiftService", ")", "AddSwift", "(", "p", "*", "AddSwiftParams", ")", "(", "*", "AddSwiftResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "AddSwiftResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Adds Swift.
[ "Adds", "Swift", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SwiftService.go#L92-L104
145,551
xanzy/go-cloudstack
cloudstack/SwiftService.go
NewListSwiftsParams
func (s *SwiftService) NewListSwiftsParams() *ListSwiftsParams { p := &ListSwiftsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *SwiftService) NewListSwiftsParams() *ListSwiftsParams { p := &ListSwiftsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "SwiftService", ")", "NewListSwiftsParams", "(", ")", "*", "ListSwiftsParams", "{", "p", ":=", "&", "ListSwiftsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListSwiftsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListSwiftsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SwiftService.go#L178-L182
145,552
xanzy/go-cloudstack
cloudstack/SwiftService.go
ListSwifts
func (s *SwiftService) ListSwifts(p *ListSwiftsParams) (*ListSwiftsResponse, error) { resp, err := s.cs.newRequest("listSwifts", p.toURLValues()) if err != nil { return nil, err } var r ListSwiftsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *SwiftService) ListSwifts(p *ListSwiftsParams) (*ListSwiftsResponse, error) { resp, err := s.cs.newRequest("listSwifts", p.toURLValues()) if err != nil { return nil, err } var r ListSwiftsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "SwiftService", ")", "ListSwifts", "(", "p", "*", "ListSwiftsParams", ")", "(", "*", "ListSwiftsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListSwiftsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// List Swift.
[ "List", "Swift", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SwiftService.go#L221-L233
145,553
xanzy/go-cloudstack
cloudstack/SnapshotService.go
NewCreateSnapshotParams
func (s *SnapshotService) NewCreateSnapshotParams(volumeid string) *CreateSnapshotParams { p := &CreateSnapshotParams{} p.p = make(map[string]interface{}) p.p["volumeid"] = volumeid return p }
go
func (s *SnapshotService) NewCreateSnapshotParams(volumeid string) *CreateSnapshotParams { p := &CreateSnapshotParams{} p.p = make(map[string]interface{}) p.p["volumeid"] = volumeid return p }
[ "func", "(", "s", "*", "SnapshotService", ")", "NewCreateSnapshotParams", "(", "volumeid", "string", ")", "*", "CreateSnapshotParams", "{", "p", ":=", "&", "CreateSnapshotParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "volumeid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateSnapshotParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateSnapshotParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L131-L136
145,554
xanzy/go-cloudstack
cloudstack/SnapshotService.go
CreateSnapshot
func (s *SnapshotService) CreateSnapshot(p *CreateSnapshotParams) (*CreateSnapshotResponse, error) { resp, err := s.cs.newRequest("createSnapshot", p.toURLValues()) if err != nil { return nil, err } var r CreateSnapshotResponse 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) CreateSnapshot(p *CreateSnapshotParams) (*CreateSnapshotResponse, error) { resp, err := s.cs.newRequest("createSnapshot", p.toURLValues()) if err != nil { return nil, err } var r CreateSnapshotResponse 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", ")", "CreateSnapshot", "(", "p", "*", "CreateSnapshotParams", ")", "(", "*", "CreateSnapshotResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateSnapshotResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Creates an instant snapshot of a volume.
[ "Creates", "an", "instant", "snapshot", "of", "a", "volume", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L139-L171
145,555
xanzy/go-cloudstack
cloudstack/SnapshotService.go
NewCreateSnapshotPolicyParams
func (s *SnapshotService) NewCreateSnapshotPolicyParams(intervaltype string, maxsnaps int, schedule string, timezone string, volumeid string) *CreateSnapshotPolicyParams { p := &CreateSnapshotPolicyParams{} p.p = make(map[string]interface{}) p.p["intervaltype"] = intervaltype p.p["maxsnaps"] = maxsnaps p.p["schedule"] = schedule p.p["timezone"] = timezone p.p["volumeid"] = volumeid return p }
go
func (s *SnapshotService) NewCreateSnapshotPolicyParams(intervaltype string, maxsnaps int, schedule string, timezone string, volumeid string) *CreateSnapshotPolicyParams { p := &CreateSnapshotPolicyParams{} p.p = make(map[string]interface{}) p.p["intervaltype"] = intervaltype p.p["maxsnaps"] = maxsnaps p.p["schedule"] = schedule p.p["timezone"] = timezone p.p["volumeid"] = volumeid return p }
[ "func", "(", "s", "*", "SnapshotService", ")", "NewCreateSnapshotPolicyParams", "(", "intervaltype", "string", ",", "maxsnaps", "int", ",", "schedule", "string", ",", "timezone", "string", ",", "volumeid", "string", ")", "*", "CreateSnapshotPolicyParams", "{", "p", ":=", "&", "CreateSnapshotPolicyParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "intervaltype", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "maxsnaps", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "schedule", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "timezone", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "volumeid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateSnapshotPolicyParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateSnapshotPolicyParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L281-L290
145,556
xanzy/go-cloudstack
cloudstack/SnapshotService.go
CreateSnapshotPolicy
func (s *SnapshotService) CreateSnapshotPolicy(p *CreateSnapshotPolicyParams) (*CreateSnapshotPolicyResponse, error) { resp, err := s.cs.newRequest("createSnapshotPolicy", p.toURLValues()) if err != nil { return nil, err } var r CreateSnapshotPolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *SnapshotService) CreateSnapshotPolicy(p *CreateSnapshotPolicyParams) (*CreateSnapshotPolicyResponse, error) { resp, err := s.cs.newRequest("createSnapshotPolicy", p.toURLValues()) if err != nil { return nil, err } var r CreateSnapshotPolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "SnapshotService", ")", "CreateSnapshotPolicy", "(", "p", "*", "CreateSnapshotPolicyParams", ")", "(", "*", "CreateSnapshotPolicyResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateSnapshotPolicyResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Creates a snapshot policy for the account.
[ "Creates", "a", "snapshot", "policy", "for", "the", "account", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L293-L305
145,557
xanzy/go-cloudstack
cloudstack/SnapshotService.go
NewCreateVMSnapshotParams
func (s *SnapshotService) NewCreateVMSnapshotParams(virtualmachineid string) *CreateVMSnapshotParams { p := &CreateVMSnapshotParams{} p.p = make(map[string]interface{}) p.p["virtualmachineid"] = virtualmachineid return p }
go
func (s *SnapshotService) NewCreateVMSnapshotParams(virtualmachineid string) *CreateVMSnapshotParams { p := &CreateVMSnapshotParams{} p.p = make(map[string]interface{}) p.p["virtualmachineid"] = virtualmachineid return p }
[ "func", "(", "s", "*", "SnapshotService", ")", "NewCreateVMSnapshotParams", "(", "virtualmachineid", "string", ")", "*", "CreateVMSnapshotParams", "{", "p", ":=", "&", "CreateVMSnapshotParams", "{", "}", "\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 CreateVMSnapshotParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateVMSnapshotParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L388-L393
145,558
xanzy/go-cloudstack
cloudstack/SnapshotService.go
CreateVMSnapshot
func (s *SnapshotService) CreateVMSnapshot(p *CreateVMSnapshotParams) (*CreateVMSnapshotResponse, error) { resp, err := s.cs.newRequest("createVMSnapshot", p.toURLValues()) if err != nil { return nil, err } var r CreateVMSnapshotResponse 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) CreateVMSnapshot(p *CreateVMSnapshotParams) (*CreateVMSnapshotResponse, error) { resp, err := s.cs.newRequest("createVMSnapshot", p.toURLValues()) if err != nil { return nil, err } var r CreateVMSnapshotResponse 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", ")", "CreateVMSnapshot", "(", "p", "*", "CreateVMSnapshotParams", ")", "(", "*", "CreateVMSnapshotResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateVMSnapshotResponse", "\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 snapshot for a vm.
[ "Creates", "snapshot", "for", "a", "vm", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L396-L428
145,559
xanzy/go-cloudstack
cloudstack/SnapshotService.go
NewDeleteSnapshotParams
func (s *SnapshotService) NewDeleteSnapshotParams(id string) *DeleteSnapshotParams { p := &DeleteSnapshotParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *SnapshotService) NewDeleteSnapshotParams(id string) *DeleteSnapshotParams { p := &DeleteSnapshotParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "SnapshotService", ")", "NewDeleteSnapshotParams", "(", "id", "string", ")", "*", "DeleteSnapshotParams", "{", "p", ":=", "&", "DeleteSnapshotParams", "{", "}", "\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 DeleteSnapshotParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteSnapshotParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L476-L481
145,560
xanzy/go-cloudstack
cloudstack/SnapshotService.go
DeleteSnapshot
func (s *SnapshotService) DeleteSnapshot(p *DeleteSnapshotParams) (*DeleteSnapshotResponse, error) { resp, err := s.cs.newRequest("deleteSnapshot", p.toURLValues()) if err != nil { return nil, err } var r DeleteSnapshotResponse 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 *SnapshotService) DeleteSnapshot(p *DeleteSnapshotParams) (*DeleteSnapshotResponse, error) { resp, err := s.cs.newRequest("deleteSnapshot", p.toURLValues()) if err != nil { return nil, err } var r DeleteSnapshotResponse 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", "*", "SnapshotService", ")", "DeleteSnapshot", "(", "p", "*", "DeleteSnapshotParams", ")", "(", "*", "DeleteSnapshotResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteSnapshotResponse", "\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 snapshot of a disk volume.
[ "Deletes", "a", "snapshot", "of", "a", "disk", "volume", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L484-L511
145,561
xanzy/go-cloudstack
cloudstack/SnapshotService.go
NewDeleteSnapshotPoliciesParams
func (s *SnapshotService) NewDeleteSnapshotPoliciesParams() *DeleteSnapshotPoliciesParams { p := &DeleteSnapshotPoliciesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *SnapshotService) NewDeleteSnapshotPoliciesParams() *DeleteSnapshotPoliciesParams { p := &DeleteSnapshotPoliciesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "SnapshotService", ")", "NewDeleteSnapshotPoliciesParams", "(", ")", "*", "DeleteSnapshotPoliciesParams", "{", "p", ":=", "&", "DeleteSnapshotPoliciesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteSnapshotPoliciesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteSnapshotPoliciesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L556-L560
145,562
xanzy/go-cloudstack
cloudstack/SnapshotService.go
DeleteSnapshotPolicies
func (s *SnapshotService) DeleteSnapshotPolicies(p *DeleteSnapshotPoliciesParams) (*DeleteSnapshotPoliciesResponse, error) { resp, err := s.cs.newRequest("deleteSnapshotPolicies", p.toURLValues()) if err != nil { return nil, err } var r DeleteSnapshotPoliciesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *SnapshotService) DeleteSnapshotPolicies(p *DeleteSnapshotPoliciesParams) (*DeleteSnapshotPoliciesResponse, error) { resp, err := s.cs.newRequest("deleteSnapshotPolicies", p.toURLValues()) if err != nil { return nil, err } var r DeleteSnapshotPoliciesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "SnapshotService", ")", "DeleteSnapshotPolicies", "(", "p", "*", "DeleteSnapshotPoliciesParams", ")", "(", "*", "DeleteSnapshotPoliciesResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteSnapshotPoliciesResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Deletes snapshot policies for the account.
[ "Deletes", "snapshot", "policies", "for", "the", "account", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L563-L575
145,563
xanzy/go-cloudstack
cloudstack/SnapshotService.go
NewDeleteVMSnapshotParams
func (s *SnapshotService) NewDeleteVMSnapshotParams(vmsnapshotid string) *DeleteVMSnapshotParams { p := &DeleteVMSnapshotParams{} p.p = make(map[string]interface{}) p.p["vmsnapshotid"] = vmsnapshotid return p }
go
func (s *SnapshotService) NewDeleteVMSnapshotParams(vmsnapshotid string) *DeleteVMSnapshotParams { p := &DeleteVMSnapshotParams{} p.p = make(map[string]interface{}) p.p["vmsnapshotid"] = vmsnapshotid return p }
[ "func", "(", "s", "*", "SnapshotService", ")", "NewDeleteVMSnapshotParams", "(", "vmsnapshotid", "string", ")", "*", "DeleteVMSnapshotParams", "{", "p", ":=", "&", "DeleteVMSnapshotParams", "{", "}", "\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 DeleteVMSnapshotParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteVMSnapshotParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L626-L631
145,564
xanzy/go-cloudstack
cloudstack/SnapshotService.go
DeleteVMSnapshot
func (s *SnapshotService) DeleteVMSnapshot(p *DeleteVMSnapshotParams) (*DeleteVMSnapshotResponse, error) { resp, err := s.cs.newRequest("deleteVMSnapshot", p.toURLValues()) if err != nil { return nil, err } var r DeleteVMSnapshotResponse 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 *SnapshotService) DeleteVMSnapshot(p *DeleteVMSnapshotParams) (*DeleteVMSnapshotResponse, error) { resp, err := s.cs.newRequest("deleteVMSnapshot", p.toURLValues()) if err != nil { return nil, err } var r DeleteVMSnapshotResponse 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", "*", "SnapshotService", ")", "DeleteVMSnapshot", "(", "p", "*", "DeleteVMSnapshotParams", ")", "(", "*", "DeleteVMSnapshotResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteVMSnapshotResponse", "\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 vmsnapshot.
[ "Deletes", "a", "vmsnapshot", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L634-L661
145,565
xanzy/go-cloudstack
cloudstack/SnapshotService.go
NewListSnapshotPoliciesParams
func (s *SnapshotService) NewListSnapshotPoliciesParams() *ListSnapshotPoliciesParams { p := &ListSnapshotPoliciesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *SnapshotService) NewListSnapshotPoliciesParams() *ListSnapshotPoliciesParams { p := &ListSnapshotPoliciesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "SnapshotService", ")", "NewListSnapshotPoliciesParams", "(", ")", "*", "ListSnapshotPoliciesParams", "{", "p", ":=", "&", "ListSnapshotPoliciesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListSnapshotPoliciesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListSnapshotPoliciesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L752-L756
145,566
xanzy/go-cloudstack
cloudstack/SnapshotService.go
ListSnapshotPolicies
func (s *SnapshotService) ListSnapshotPolicies(p *ListSnapshotPoliciesParams) (*ListSnapshotPoliciesResponse, error) { resp, err := s.cs.newRequest("listSnapshotPolicies", p.toURLValues()) if err != nil { return nil, err } var r ListSnapshotPoliciesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *SnapshotService) ListSnapshotPolicies(p *ListSnapshotPoliciesParams) (*ListSnapshotPoliciesResponse, error) { resp, err := s.cs.newRequest("listSnapshotPolicies", p.toURLValues()) if err != nil { return nil, err } var r ListSnapshotPoliciesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "SnapshotService", ")", "ListSnapshotPolicies", "(", "p", "*", "ListSnapshotPoliciesParams", ")", "(", "*", "ListSnapshotPoliciesResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListSnapshotPoliciesResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists snapshot policies.
[ "Lists", "snapshot", "policies", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L792-L804
145,567
xanzy/go-cloudstack
cloudstack/SnapshotService.go
NewListSnapshotsParams
func (s *SnapshotService) NewListSnapshotsParams() *ListSnapshotsParams { p := &ListSnapshotsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *SnapshotService) NewListSnapshotsParams() *ListSnapshotsParams { p := &ListSnapshotsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "SnapshotService", ")", "NewListSnapshotsParams", "(", ")", "*", "ListSnapshotsParams", "{", "p", ":=", "&", "ListSnapshotsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListSnapshotsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListSnapshotsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L1021-L1025
145,568
xanzy/go-cloudstack
cloudstack/SnapshotService.go
ListSnapshots
func (s *SnapshotService) ListSnapshots(p *ListSnapshotsParams) (*ListSnapshotsResponse, error) { resp, err := s.cs.newRequest("listSnapshots", p.toURLValues()) if err != nil { return nil, err } var r ListSnapshotsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *SnapshotService) ListSnapshots(p *ListSnapshotsParams) (*ListSnapshotsResponse, error) { resp, err := s.cs.newRequest("listSnapshots", p.toURLValues()) if err != nil { return nil, err } var r ListSnapshotsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "SnapshotService", ")", "ListSnapshots", "(", "p", "*", "ListSnapshotsParams", ")", "(", "*", "ListSnapshotsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListSnapshotsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists all available snapshots for the account.
[ "Lists", "all", "available", "snapshots", "for", "the", "account", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L1111-L1123
145,569
xanzy/go-cloudstack
cloudstack/SnapshotService.go
NewListVMSnapshotParams
func (s *SnapshotService) NewListVMSnapshotParams() *ListVMSnapshotParams { p := &ListVMSnapshotParams{} p.p = make(map[string]interface{}) return p }
go
func (s *SnapshotService) NewListVMSnapshotParams() *ListVMSnapshotParams { p := &ListVMSnapshotParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "SnapshotService", ")", "NewListVMSnapshotParams", "(", ")", "*", "ListVMSnapshotParams", "{", "p", ":=", "&", "ListVMSnapshotParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListVMSnapshotParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListVMSnapshotParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L1333-L1337
145,570
xanzy/go-cloudstack
cloudstack/SnapshotService.go
ListVMSnapshot
func (s *SnapshotService) ListVMSnapshot(p *ListVMSnapshotParams) (*ListVMSnapshotResponse, error) { resp, err := s.cs.newRequest("listVMSnapshot", p.toURLValues()) if err != nil { return nil, err } var r ListVMSnapshotResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *SnapshotService) ListVMSnapshot(p *ListVMSnapshotParams) (*ListVMSnapshotResponse, error) { resp, err := s.cs.newRequest("listVMSnapshot", p.toURLValues()) if err != nil { return nil, err } var r ListVMSnapshotResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "SnapshotService", ")", "ListVMSnapshot", "(", "p", "*", "ListVMSnapshotParams", ")", "(", "*", "ListVMSnapshotResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListVMSnapshotResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// List virtual machine snapshot by conditions
[ "List", "virtual", "machine", "snapshot", "by", "conditions" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L1376-L1388
145,571
xanzy/go-cloudstack
cloudstack/SnapshotService.go
NewRevertSnapshotParams
func (s *SnapshotService) NewRevertSnapshotParams(id string) *RevertSnapshotParams { p := &RevertSnapshotParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *SnapshotService) NewRevertSnapshotParams(id string) *RevertSnapshotParams { p := &RevertSnapshotParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "SnapshotService", ")", "NewRevertSnapshotParams", "(", "id", "string", ")", "*", "RevertSnapshotParams", "{", "p", ":=", "&", "RevertSnapshotParams", "{", "}", "\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 RevertSnapshotParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "RevertSnapshotParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L1440-L1445
145,572
xanzy/go-cloudstack
cloudstack/SnapshotService.go
RevertSnapshot
func (s *SnapshotService) RevertSnapshot(p *RevertSnapshotParams) (*RevertSnapshotResponse, error) { resp, err := s.cs.newRequest("revertSnapshot", p.toURLValues()) if err != nil { return nil, err } var r RevertSnapshotResponse 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) RevertSnapshot(p *RevertSnapshotParams) (*RevertSnapshotResponse, error) { resp, err := s.cs.newRequest("revertSnapshot", p.toURLValues()) if err != nil { return nil, err } var r RevertSnapshotResponse 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", ")", "RevertSnapshot", "(", "p", "*", "RevertSnapshotParams", ")", "(", "*", "RevertSnapshotResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "RevertSnapshotResponse", "\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", "}" ]
// This is supposed to revert a volume snapshot. This command is only supported with KVM so far
[ "This", "is", "supposed", "to", "revert", "a", "volume", "snapshot", ".", "This", "command", "is", "only", "supported", "with", "KVM", "so", "far" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SnapshotService.go#L1448-L1480
145,573
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
145,574
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
145,575
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
145,576
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
145,577
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
145,578
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
145,579
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
145,580
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
145,581
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
145,582
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
145,583
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
145,584
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
145,585
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
145,586
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
145,587
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
145,588
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
145,589
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
145,590
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
145,591
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
145,592
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
145,593
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
145,594
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
145,595
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
145,596
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
145,597
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
145,598
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
145,599
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