repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
list
docstring
stringlengths
6
2.61k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
85
252
partition
stringclasses
1 value
xanzy/go-cloudstack
cloudstack/VMGroupService.go
UpdateInstanceGroup
func (s *VMGroupService) UpdateInstanceGroup(p *UpdateInstanceGroupParams) (*UpdateInstanceGroupResponse, error) { resp, err := s.cs.newRequest("updateInstanceGroup", p.toURLValues()) if err != nil { return nil, err } var r UpdateInstanceGroupResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VMGroupService) UpdateInstanceGroup(p *UpdateInstanceGroupParams) (*UpdateInstanceGroupResponse, error) { resp, err := s.cs.newRequest("updateInstanceGroup", p.toURLValues()) if err != nil { return nil, err } var r UpdateInstanceGroupResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VMGroupService", ")", "UpdateInstanceGroup", "(", "p", "*", "UpdateInstanceGroupParams", ")", "(", "*", "UpdateInstanceGroupResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateInstanceGroupResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Updates a vm group
[ "Updates", "a", "vm", "group" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VMGroupService.go#L481-L493
train
xanzy/go-cloudstack
cloudstack/ServiceOfferingService.go
NewCreateServiceOfferingParams
func (s *ServiceOfferingService) NewCreateServiceOfferingParams(displaytext string, name string) *CreateServiceOfferingParams { p := &CreateServiceOfferingParams{} p.p = make(map[string]interface{}) p.p["displaytext"] = displaytext p.p["name"] = name return p }
go
func (s *ServiceOfferingService) NewCreateServiceOfferingParams(displaytext string, name string) *CreateServiceOfferingParams { p := &CreateServiceOfferingParams{} p.p = make(map[string]interface{}) p.p["displaytext"] = displaytext p.p["name"] = name return p }
[ "func", "(", "s", "*", "ServiceOfferingService", ")", "NewCreateServiceOfferingParams", "(", "displaytext", "string", ",", "name", "string", ")", "*", "CreateServiceOfferingParams", "{", "p", ":=", "&", "CreateServiceOfferingParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "displaytext", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateServiceOfferingParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateServiceOfferingParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ServiceOfferingService.go#L348-L354
train
xanzy/go-cloudstack
cloudstack/ServiceOfferingService.go
NewDeleteServiceOfferingParams
func (s *ServiceOfferingService) NewDeleteServiceOfferingParams(id string) *DeleteServiceOfferingParams { p := &DeleteServiceOfferingParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *ServiceOfferingService) NewDeleteServiceOfferingParams(id string) *DeleteServiceOfferingParams { p := &DeleteServiceOfferingParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "ServiceOfferingService", ")", "NewDeleteServiceOfferingParams", "(", "id", "string", ")", "*", "DeleteServiceOfferingParams", "{", "p", ":=", "&", "DeleteServiceOfferingParams", "{", "}", "\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 DeleteServiceOfferingParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteServiceOfferingParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ServiceOfferingService.go#L434-L439
train
xanzy/go-cloudstack
cloudstack/ServiceOfferingService.go
NewListServiceOfferingsParams
func (s *ServiceOfferingService) NewListServiceOfferingsParams() *ListServiceOfferingsParams { p := &ListServiceOfferingsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *ServiceOfferingService) NewListServiceOfferingsParams() *ListServiceOfferingsParams { p := &ListServiceOfferingsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "ServiceOfferingService", ")", "NewListServiceOfferingsParams", "(", ")", "*", "ListServiceOfferingsParams", "{", "p", ":=", "&", "ListServiceOfferingsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListServiceOfferingsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListServiceOfferingsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ServiceOfferingService.go#L620-L624
train
xanzy/go-cloudstack
cloudstack/ServiceOfferingService.go
NewUpdateServiceOfferingParams
func (s *ServiceOfferingService) NewUpdateServiceOfferingParams(id string) *UpdateServiceOfferingParams { p := &UpdateServiceOfferingParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *ServiceOfferingService) NewUpdateServiceOfferingParams(id string) *UpdateServiceOfferingParams { p := &UpdateServiceOfferingParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "ServiceOfferingService", ")", "NewUpdateServiceOfferingParams", "(", "id", "string", ")", "*", "UpdateServiceOfferingParams", "{", "p", ":=", "&", "UpdateServiceOfferingParams", "{", "}", "\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 UpdateServiceOfferingParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateServiceOfferingParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ServiceOfferingService.go#L822-L827
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
NewAddLdapConfigurationParams
func (s *LDAPService) NewAddLdapConfigurationParams(hostname string, port int) *AddLdapConfigurationParams { p := &AddLdapConfigurationParams{} p.p = make(map[string]interface{}) p.p["hostname"] = hostname p.p["port"] = port return p }
go
func (s *LDAPService) NewAddLdapConfigurationParams(hostname string, port int) *AddLdapConfigurationParams { p := &AddLdapConfigurationParams{} p.p = make(map[string]interface{}) p.p["hostname"] = hostname p.p["port"] = port return p }
[ "func", "(", "s", "*", "LDAPService", ")", "NewAddLdapConfigurationParams", "(", "hostname", "string", ",", "port", "int", ")", "*", "AddLdapConfigurationParams", "{", "p", ":=", "&", "AddLdapConfigurationParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "hostname", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "port", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AddLdapConfigurationParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddLdapConfigurationParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L74-L80
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
AddLdapConfiguration
func (s *LDAPService) AddLdapConfiguration(p *AddLdapConfigurationParams) (*AddLdapConfigurationResponse, error) { resp, err := s.cs.newRequest("addLdapConfiguration", p.toURLValues()) if err != nil { return nil, err } var r AddLdapConfigurationResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *LDAPService) AddLdapConfiguration(p *AddLdapConfigurationParams) (*AddLdapConfigurationResponse, error) { resp, err := s.cs.newRequest("addLdapConfiguration", p.toURLValues()) if err != nil { return nil, err } var r AddLdapConfigurationResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "LDAPService", ")", "AddLdapConfiguration", "(", "p", "*", "AddLdapConfigurationParams", ")", "(", "*", "AddLdapConfigurationResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "AddLdapConfigurationResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Add a new Ldap Configuration
[ "Add", "a", "new", "Ldap", "Configuration" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L83-L95
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
NewDeleteLdapConfigurationParams
func (s *LDAPService) NewDeleteLdapConfigurationParams(hostname string) *DeleteLdapConfigurationParams { p := &DeleteLdapConfigurationParams{} p.p = make(map[string]interface{}) p.p["hostname"] = hostname return p }
go
func (s *LDAPService) NewDeleteLdapConfigurationParams(hostname string) *DeleteLdapConfigurationParams { p := &DeleteLdapConfigurationParams{} p.p = make(map[string]interface{}) p.p["hostname"] = hostname return p }
[ "func", "(", "s", "*", "LDAPService", ")", "NewDeleteLdapConfigurationParams", "(", "hostname", "string", ")", "*", "DeleteLdapConfigurationParams", "{", "p", ":=", "&", "DeleteLdapConfigurationParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "hostname", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteLdapConfigurationParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteLdapConfigurationParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L151-L156
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
DeleteLdapConfiguration
func (s *LDAPService) DeleteLdapConfiguration(p *DeleteLdapConfigurationParams) (*DeleteLdapConfigurationResponse, error) { resp, err := s.cs.newRequest("deleteLdapConfiguration", p.toURLValues()) if err != nil { return nil, err } var r DeleteLdapConfigurationResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *LDAPService) DeleteLdapConfiguration(p *DeleteLdapConfigurationParams) (*DeleteLdapConfigurationResponse, error) { resp, err := s.cs.newRequest("deleteLdapConfiguration", p.toURLValues()) if err != nil { return nil, err } var r DeleteLdapConfigurationResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "LDAPService", ")", "DeleteLdapConfiguration", "(", "p", "*", "DeleteLdapConfigurationParams", ")", "(", "*", "DeleteLdapConfigurationResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteLdapConfigurationResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Remove an Ldap Configuration
[ "Remove", "an", "Ldap", "Configuration" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L159-L171
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
NewImportLdapUsersParams
func (s *LDAPService) NewImportLdapUsersParams() *ImportLdapUsersParams { p := &ImportLdapUsersParams{} p.p = make(map[string]interface{}) return p }
go
func (s *LDAPService) NewImportLdapUsersParams() *ImportLdapUsersParams { p := &ImportLdapUsersParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "LDAPService", ")", "NewImportLdapUsersParams", "(", ")", "*", "ImportLdapUsersParams", "{", "p", ":=", "&", "ImportLdapUsersParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ImportLdapUsersParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ImportLdapUsersParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L311-L315
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
NewLdapConfigParams
func (s *LDAPService) NewLdapConfigParams() *LdapConfigParams { p := &LdapConfigParams{} p.p = make(map[string]interface{}) return p }
go
func (s *LDAPService) NewLdapConfigParams() *LdapConfigParams { p := &LdapConfigParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "LDAPService", ")", "NewLdapConfigParams", "(", ")", "*", "LdapConfigParams", "{", "p", ":=", "&", "LdapConfigParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new LdapConfigParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "LdapConfigParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L468-L472
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
NewLdapCreateAccountParams
func (s *LDAPService) NewLdapCreateAccountParams(username string) *LdapCreateAccountParams { p := &LdapCreateAccountParams{} p.p = make(map[string]interface{}) p.p["username"] = username return p }
go
func (s *LDAPService) NewLdapCreateAccountParams(username string) *LdapCreateAccountParams { p := &LdapCreateAccountParams{} p.p = make(map[string]interface{}) p.p["username"] = username return p }
[ "func", "(", "s", "*", "LDAPService", ")", "NewLdapCreateAccountParams", "(", "username", "string", ")", "*", "LdapCreateAccountParams", "{", "p", ":=", "&", "LdapCreateAccountParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "username", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new LdapCreateAccountParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "LdapCreateAccountParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L629-L634
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
LdapCreateAccount
func (s *LDAPService) LdapCreateAccount(p *LdapCreateAccountParams) (*LdapCreateAccountResponse, error) { resp, err := s.cs.newRequest("ldapCreateAccount", p.toURLValues()) if err != nil { return nil, err } var r LdapCreateAccountResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *LDAPService) LdapCreateAccount(p *LdapCreateAccountParams) (*LdapCreateAccountResponse, error) { resp, err := s.cs.newRequest("ldapCreateAccount", p.toURLValues()) if err != nil { return nil, err } var r LdapCreateAccountResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "LDAPService", ")", "LdapCreateAccount", "(", "p", "*", "LdapCreateAccountParams", ")", "(", "*", "LdapCreateAccountResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "LdapCreateAccountResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Creates an account from an LDAP user
[ "Creates", "an", "account", "from", "an", "LDAP", "user" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L637-L649
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
NewLdapRemoveParams
func (s *LDAPService) NewLdapRemoveParams() *LdapRemoveParams { p := &LdapRemoveParams{} p.p = make(map[string]interface{}) return p }
go
func (s *LDAPService) NewLdapRemoveParams() *LdapRemoveParams { p := &LdapRemoveParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "LDAPService", ")", "NewLdapRemoveParams", "(", ")", "*", "LdapRemoveParams", "{", "p", ":=", "&", "LdapRemoveParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new LdapRemoveParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "LdapRemoveParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L748-L752
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
NewLinkDomainToLdapParams
func (s *LDAPService) NewLinkDomainToLdapParams(accounttype int, domainid string, lDAPType string) *LinkDomainToLdapParams { p := &LinkDomainToLdapParams{} p.p = make(map[string]interface{}) p.p["accounttype"] = accounttype p.p["domainid"] = domainid p.p["type"] = lDAPType return p }
go
func (s *LDAPService) NewLinkDomainToLdapParams(accounttype int, domainid string, lDAPType string) *LinkDomainToLdapParams { p := &LinkDomainToLdapParams{} p.p = make(map[string]interface{}) p.p["accounttype"] = accounttype p.p["domainid"] = domainid p.p["type"] = lDAPType return p }
[ "func", "(", "s", "*", "LDAPService", ")", "NewLinkDomainToLdapParams", "(", "accounttype", "int", ",", "domainid", "string", ",", "lDAPType", "string", ")", "*", "LinkDomainToLdapParams", "{", "p", ":=", "&", "LinkDomainToLdapParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "accounttype", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "domainid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "lDAPType", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new LinkDomainToLdapParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "LinkDomainToLdapParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L860-L867
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
LinkDomainToLdap
func (s *LDAPService) LinkDomainToLdap(p *LinkDomainToLdapParams) (*LinkDomainToLdapResponse, error) { resp, err := s.cs.newRequest("linkDomainToLdap", p.toURLValues()) if err != nil { return nil, err } var r LinkDomainToLdapResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *LDAPService) LinkDomainToLdap(p *LinkDomainToLdapParams) (*LinkDomainToLdapResponse, error) { resp, err := s.cs.newRequest("linkDomainToLdap", p.toURLValues()) if err != nil { return nil, err } var r LinkDomainToLdapResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "LDAPService", ")", "LinkDomainToLdap", "(", "p", "*", "LinkDomainToLdapParams", ")", "(", "*", "LinkDomainToLdapResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "LinkDomainToLdapResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// link an existing cloudstack domain to group or OU in ldap
[ "link", "an", "existing", "cloudstack", "domain", "to", "group", "or", "OU", "in", "ldap" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L870-L882
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
NewListLdapConfigurationsParams
func (s *LDAPService) NewListLdapConfigurationsParams() *ListLdapConfigurationsParams { p := &ListLdapConfigurationsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *LDAPService) NewListLdapConfigurationsParams() *ListLdapConfigurationsParams { p := &ListLdapConfigurationsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "LDAPService", ")", "NewListLdapConfigurationsParams", "(", ")", "*", "ListLdapConfigurationsParams", "{", "p", ":=", "&", "ListLdapConfigurationsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListLdapConfigurationsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListLdapConfigurationsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L976-L980
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
ListLdapConfigurations
func (s *LDAPService) ListLdapConfigurations(p *ListLdapConfigurationsParams) (*ListLdapConfigurationsResponse, error) { resp, err := s.cs.newRequest("listLdapConfigurations", p.toURLValues()) if err != nil { return nil, err } var r ListLdapConfigurationsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *LDAPService) ListLdapConfigurations(p *ListLdapConfigurationsParams) (*ListLdapConfigurationsResponse, error) { resp, err := s.cs.newRequest("listLdapConfigurations", p.toURLValues()) if err != nil { return nil, err } var r ListLdapConfigurationsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "LDAPService", ")", "ListLdapConfigurations", "(", "p", "*", "ListLdapConfigurationsParams", ")", "(", "*", "ListLdapConfigurationsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListLdapConfigurationsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists all LDAP configurations
[ "Lists", "all", "LDAP", "configurations" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L983-L995
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
NewListLdapUsersParams
func (s *LDAPService) NewListLdapUsersParams() *ListLdapUsersParams { p := &ListLdapUsersParams{} p.p = make(map[string]interface{}) return p }
go
func (s *LDAPService) NewListLdapUsersParams() *ListLdapUsersParams { p := &ListLdapUsersParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "LDAPService", ")", "NewListLdapUsersParams", "(", ")", "*", "ListLdapUsersParams", "{", "p", ":=", "&", "ListLdapUsersParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListLdapUsersParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListLdapUsersParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L1068-L1072
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
NewSearchLdapParams
func (s *LDAPService) NewSearchLdapParams(query string) *SearchLdapParams { p := &SearchLdapParams{} p.p = make(map[string]interface{}) p.p["query"] = query return p }
go
func (s *LDAPService) NewSearchLdapParams(query string) *SearchLdapParams { p := &SearchLdapParams{} p.p = make(map[string]interface{}) p.p["query"] = query return p }
[ "func", "(", "s", "*", "LDAPService", ")", "NewSearchLdapParams", "(", "query", "string", ")", "*", "SearchLdapParams", "{", "p", ":=", "&", "SearchLdapParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "query", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new SearchLdapParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "SearchLdapParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L1163-L1168
train
xanzy/go-cloudstack
cloudstack/LDAPService.go
SearchLdap
func (s *LDAPService) SearchLdap(p *SearchLdapParams) (*SearchLdapResponse, error) { resp, err := s.cs.newRequest("searchLdap", p.toURLValues()) if err != nil { return nil, err } var r SearchLdapResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *LDAPService) SearchLdap(p *SearchLdapParams) (*SearchLdapResponse, error) { resp, err := s.cs.newRequest("searchLdap", p.toURLValues()) if err != nil { return nil, err } var r SearchLdapResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "LDAPService", ")", "SearchLdap", "(", "p", "*", "SearchLdapParams", ")", "(", "*", "SearchLdapResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "SearchLdapResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Searches LDAP based on the username attribute
[ "Searches", "LDAP", "based", "on", "the", "username", "attribute" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LDAPService.go#L1171-L1183
train
xanzy/go-cloudstack
cloudstack/AuthenticationService.go
NewLoginParams
func (s *AuthenticationService) NewLoginParams(password string, username string) *LoginParams { p := &LoginParams{} p.p = make(map[string]interface{}) p.p["password"] = password p.p["username"] = username return p }
go
func (s *AuthenticationService) NewLoginParams(password string, username string) *LoginParams { p := &LoginParams{} p.p = make(map[string]interface{}) p.p["password"] = password p.p["username"] = username return p }
[ "func", "(", "s", "*", "AuthenticationService", ")", "NewLoginParams", "(", "password", "string", ",", "username", "string", ")", "*", "LoginParams", "{", "p", ":=", "&", "LoginParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "password", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "username", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new LoginParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "LoginParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AuthenticationService.go#L84-L90
train
xanzy/go-cloudstack
cloudstack/AuthenticationService.go
Login
func (s *AuthenticationService) Login(p *LoginParams) (*LoginResponse, error) { resp, err := s.cs.newRequest("login", p.toURLValues()) if err != nil { return nil, err } var r LoginResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *AuthenticationService) Login(p *LoginParams) (*LoginResponse, error) { resp, err := s.cs.newRequest("login", p.toURLValues()) if err != nil { return nil, err } var r LoginResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "AuthenticationService", ")", "Login", "(", "p", "*", "LoginParams", ")", "(", "*", "LoginResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "LoginResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Logs a user into the CloudStack. A successful login attempt will generate a JSESSIONID cookie value that can be passed in subsequent Query command calls until the "logout" command has been issued or the session has expired.
[ "Logs", "a", "user", "into", "the", "CloudStack", ".", "A", "successful", "login", "attempt", "will", "generate", "a", "JSESSIONID", "cookie", "value", "that", "can", "be", "passed", "in", "subsequent", "Query", "command", "calls", "until", "the", "logout", "command", "has", "been", "issued", "or", "the", "session", "has", "expired", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AuthenticationService.go#L93-L105
train
xanzy/go-cloudstack
cloudstack/AuthenticationService.go
NewLogoutParams
func (s *AuthenticationService) NewLogoutParams() *LogoutParams { p := &LogoutParams{} p.p = make(map[string]interface{}) return p }
go
func (s *AuthenticationService) NewLogoutParams() *LogoutParams { p := &LogoutParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "AuthenticationService", ")", "NewLogoutParams", "(", ")", "*", "LogoutParams", "{", "p", ":=", "&", "LogoutParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new LogoutParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "LogoutParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AuthenticationService.go#L136-L140
train
xanzy/go-cloudstack
cloudstack/AuthenticationService.go
Logout
func (s *AuthenticationService) Logout(p *LogoutParams) (*LogoutResponse, error) { resp, err := s.cs.newRequest("logout", p.toURLValues()) if err != nil { return nil, err } var r LogoutResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *AuthenticationService) Logout(p *LogoutParams) (*LogoutResponse, error) { resp, err := s.cs.newRequest("logout", p.toURLValues()) if err != nil { return nil, err } var r LogoutResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "AuthenticationService", ")", "Logout", "(", "p", "*", "LogoutParams", ")", "(", "*", "LogoutResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "LogoutResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Logs out the user
[ "Logs", "out", "the", "user" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AuthenticationService.go#L143-L155
train
xanzy/go-cloudstack
cloudstack/TemplateService.go
NewCopyTemplateParams
func (s *TemplateService) NewCopyTemplateParams(id string) *CopyTemplateParams { p := &CopyTemplateParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *TemplateService) NewCopyTemplateParams(id string) *CopyTemplateParams { p := &CopyTemplateParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "TemplateService", ")", "NewCopyTemplateParams", "(", "id", "string", ")", "*", "CopyTemplateParams", "{", "p", ":=", "&", "CopyTemplateParams", "{", "}", "\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 CopyTemplateParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CopyTemplateParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L86-L91
train
xanzy/go-cloudstack
cloudstack/TemplateService.go
NewCreateTemplateParams
func (s *TemplateService) NewCreateTemplateParams(displaytext string, name string, ostypeid string) *CreateTemplateParams { p := &CreateTemplateParams{} p.p = make(map[string]interface{}) p.p["displaytext"] = displaytext p.p["name"] = name p.p["ostypeid"] = ostypeid return p }
go
func (s *TemplateService) NewCreateTemplateParams(displaytext string, name string, ostypeid string) *CreateTemplateParams { p := &CreateTemplateParams{} p.p = make(map[string]interface{}) p.p["displaytext"] = displaytext p.p["name"] = name p.p["ostypeid"] = ostypeid return p }
[ "func", "(", "s", "*", "TemplateService", ")", "NewCreateTemplateParams", "(", "displaytext", "string", ",", "name", "string", ",", "ostypeid", "string", ")", "*", "CreateTemplateParams", "{", "p", ":=", "&", "CreateTemplateParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "displaytext", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "ostypeid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateTemplateParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateTemplateParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/TemplateService.go#L372-L379
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train