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/ISOService.go
UpdateIsoPermissions
func (s *ISOService) UpdateIsoPermissions(p *UpdateIsoPermissionsParams) (*UpdateIsoPermissionsResponse, error) { resp, err := s.cs.newRequest("updateIsoPermissions", p.toURLValues()) if err != nil { return nil, err } var r UpdateIsoPermissionsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *ISOService) UpdateIsoPermissions(p *UpdateIsoPermissionsParams) (*UpdateIsoPermissionsResponse, error) { resp, err := s.cs.newRequest("updateIsoPermissions", p.toURLValues()) if err != nil { return nil, err } var r UpdateIsoPermissionsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "ISOService", ")", "UpdateIsoPermissions", "(", "p", "*", "UpdateIsoPermissionsParams", ")", "(", "*", "UpdateIsoPermissionsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateIsoPermissionsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Updates ISO permissions
[ "Updates", "ISO", "permissions" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L1805-L1817
train
xanzy/go-cloudstack
cloudstack/DomainService.go
NewCreateDomainParams
func (s *DomainService) NewCreateDomainParams(name string) *CreateDomainParams { p := &CreateDomainParams{} p.p = make(map[string]interface{}) p.p["name"] = name return p }
go
func (s *DomainService) NewCreateDomainParams(name string) *CreateDomainParams { p := &CreateDomainParams{} p.p = make(map[string]interface{}) p.p["name"] = name return p }
[ "func", "(", "s", "*", "DomainService", ")", "NewCreateDomainParams", "(", "name", "string", ")", "*", "CreateDomainParams", "{", "p", ":=", "&", "CreateDomainParams", "{", "}", "\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 CreateDomainParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateDomainParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/DomainService.go#L85-L90
train
xanzy/go-cloudstack
cloudstack/DomainService.go
NewDeleteDomainParams
func (s *DomainService) NewDeleteDomainParams(id string) *DeleteDomainParams { p := &DeleteDomainParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *DomainService) NewDeleteDomainParams(id string) *DeleteDomainParams { p := &DeleteDomainParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "DomainService", ")", "NewDeleteDomainParams", "(", "id", "string", ")", "*", "DeleteDomainParams", "{", "p", ":=", "&", "DeleteDomainParams", "{", "}", "\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 DeleteDomainParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteDomainParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/DomainService.go#L192-L197
train
xanzy/go-cloudstack
cloudstack/DomainService.go
NewListDomainChildrenParams
func (s *DomainService) NewListDomainChildrenParams() *ListDomainChildrenParams { p := &ListDomainChildrenParams{} p.p = make(map[string]interface{}) return p }
go
func (s *DomainService) NewListDomainChildrenParams() *ListDomainChildrenParams { p := &ListDomainChildrenParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "DomainService", ")", "NewListDomainChildrenParams", "(", ")", "*", "ListDomainChildrenParams", "{", "p", ":=", "&", "ListDomainChildrenParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListDomainChildrenParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListDomainChildrenParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/DomainService.go#L330-L334
train
xanzy/go-cloudstack
cloudstack/DomainService.go
NewListDomainsParams
func (s *DomainService) NewListDomainsParams() *ListDomainsParams { p := &ListDomainsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *DomainService) NewListDomainsParams() *ListDomainsParams { p := &ListDomainsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "DomainService", ")", "NewListDomainsParams", "(", ")", "*", "ListDomainsParams", "{", "p", ":=", "&", "ListDomainsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListDomainsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListDomainsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/DomainService.go#L594-L598
train
xanzy/go-cloudstack
cloudstack/DomainService.go
NewUpdateDomainParams
func (s *DomainService) NewUpdateDomainParams(id string) *UpdateDomainParams { p := &UpdateDomainParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *DomainService) NewUpdateDomainParams(id string) *UpdateDomainParams { p := &UpdateDomainParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "DomainService", ")", "NewUpdateDomainParams", "(", "id", "string", ")", "*", "UpdateDomainParams", "{", "p", ":=", "&", "UpdateDomainParams", "{", "}", "\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 UpdateDomainParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateDomainParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/DomainService.go#L798-L803
train
xanzy/go-cloudstack
cloudstack/CloudIdentifierService.go
NewGetCloudIdentifierParams
func (s *CloudIdentifierService) NewGetCloudIdentifierParams(userid string) *GetCloudIdentifierParams { p := &GetCloudIdentifierParams{} p.p = make(map[string]interface{}) p.p["userid"] = userid return p }
go
func (s *CloudIdentifierService) NewGetCloudIdentifierParams(userid string) *GetCloudIdentifierParams { p := &GetCloudIdentifierParams{} p.p = make(map[string]interface{}) p.p["userid"] = userid return p }
[ "func", "(", "s", "*", "CloudIdentifierService", ")", "NewGetCloudIdentifierParams", "(", "userid", "string", ")", "*", "GetCloudIdentifierParams", "{", "p", ":=", "&", "GetCloudIdentifierParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "userid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new GetCloudIdentifierParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "GetCloudIdentifierParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/CloudIdentifierService.go#L49-L54
train
xanzy/go-cloudstack
cloudstack/CloudIdentifierService.go
GetCloudIdentifier
func (s *CloudIdentifierService) GetCloudIdentifier(p *GetCloudIdentifierParams) (*GetCloudIdentifierResponse, error) { resp, err := s.cs.newRequest("getCloudIdentifier", p.toURLValues()) if err != nil { return nil, err } var r GetCloudIdentifierResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *CloudIdentifierService) GetCloudIdentifier(p *GetCloudIdentifierParams) (*GetCloudIdentifierResponse, error) { resp, err := s.cs.newRequest("getCloudIdentifier", p.toURLValues()) if err != nil { return nil, err } var r GetCloudIdentifierResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "CloudIdentifierService", ")", "GetCloudIdentifier", "(", "p", "*", "GetCloudIdentifierParams", ")", "(", "*", "GetCloudIdentifierResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "GetCloudIdentifierResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Retrieves a cloud identifier.
[ "Retrieves", "a", "cloud", "identifier", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/CloudIdentifierService.go#L57-L69
train
xanzy/go-cloudstack
cloudstack/CertificateService.go
NewUploadCustomCertificateParams
func (s *CertificateService) NewUploadCustomCertificateParams(certificate string, domainsuffix string) *UploadCustomCertificateParams { p := &UploadCustomCertificateParams{} p.p = make(map[string]interface{}) p.p["certificate"] = certificate p.p["domainsuffix"] = domainsuffix return p }
go
func (s *CertificateService) NewUploadCustomCertificateParams(certificate string, domainsuffix string) *UploadCustomCertificateParams { p := &UploadCustomCertificateParams{} p.p = make(map[string]interface{}) p.p["certificate"] = certificate p.p["domainsuffix"] = domainsuffix return p }
[ "func", "(", "s", "*", "CertificateService", ")", "NewUploadCustomCertificateParams", "(", "certificate", "string", ",", "domainsuffix", "string", ")", "*", "UploadCustomCertificateParams", "{", "p", ":=", "&", "UploadCustomCertificateParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "certificate", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "domainsuffix", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UploadCustomCertificateParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UploadCustomCertificateParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/CertificateService.go#L95-L101
train
xanzy/go-cloudstack
cloudstack/CertificateService.go
UploadCustomCertificate
func (s *CertificateService) UploadCustomCertificate(p *UploadCustomCertificateParams) (*UploadCustomCertificateResponse, error) { resp, err := s.cs.newRequest("uploadCustomCertificate", p.toURLValues()) if err != nil { return nil, err } var r UploadCustomCertificateResponse 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 *CertificateService) UploadCustomCertificate(p *UploadCustomCertificateParams) (*UploadCustomCertificateResponse, error) { resp, err := s.cs.newRequest("uploadCustomCertificate", p.toURLValues()) if err != nil { return nil, err } var r UploadCustomCertificateResponse 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", "*", "CertificateService", ")", "UploadCustomCertificate", "(", "p", "*", "UploadCustomCertificateParams", ")", "(", "*", "UploadCustomCertificateResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UploadCustomCertificateResponse", "\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", "}" ]
// Uploads a custom certificate for the console proxy VMs to use for SSL. Can be used to upload a single certificate signed by a known CA. Can also be used, through multiple calls, to upload a chain of certificates from CA to the custom certificate itself.
[ "Uploads", "a", "custom", "certificate", "for", "the", "console", "proxy", "VMs", "to", "use", "for", "SSL", ".", "Can", "be", "used", "to", "upload", "a", "single", "certificate", "signed", "by", "a", "known", "CA", ".", "Can", "also", "be", "used", "through", "multiple", "calls", "to", "upload", "a", "chain", "of", "certificates", "from", "CA", "to", "the", "custom", "certificate", "itself", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/CertificateService.go#L104-L136
train
xanzy/go-cloudstack
cloudstack/InternalLBService.go
NewConfigureInternalLoadBalancerElementParams
func (s *InternalLBService) NewConfigureInternalLoadBalancerElementParams(enabled bool, id string) *ConfigureInternalLoadBalancerElementParams { p := &ConfigureInternalLoadBalancerElementParams{} p.p = make(map[string]interface{}) p.p["enabled"] = enabled p.p["id"] = id return p }
go
func (s *InternalLBService) NewConfigureInternalLoadBalancerElementParams(enabled bool, id string) *ConfigureInternalLoadBalancerElementParams { p := &ConfigureInternalLoadBalancerElementParams{} p.p = make(map[string]interface{}) p.p["enabled"] = enabled p.p["id"] = id return p }
[ "func", "(", "s", "*", "InternalLBService", ")", "NewConfigureInternalLoadBalancerElementParams", "(", "enabled", "bool", ",", "id", "string", ")", "*", "ConfigureInternalLoadBalancerElementParams", "{", "p", ":=", "&", "ConfigureInternalLoadBalancerElementParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "enabled", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ConfigureInternalLoadBalancerElementParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ConfigureInternalLoadBalancerElementParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/InternalLBService.go#L64-L70
train
xanzy/go-cloudstack
cloudstack/InternalLBService.go
ConfigureInternalLoadBalancerElement
func (s *InternalLBService) ConfigureInternalLoadBalancerElement(p *ConfigureInternalLoadBalancerElementParams) (*InternalLoadBalancerElementResponse, error) { resp, err := s.cs.newRequest("configureInternalLoadBalancerElement", p.toURLValues()) if err != nil { return nil, err } var r InternalLoadBalancerElementResponse 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 *InternalLBService) ConfigureInternalLoadBalancerElement(p *ConfigureInternalLoadBalancerElementParams) (*InternalLoadBalancerElementResponse, error) { resp, err := s.cs.newRequest("configureInternalLoadBalancerElement", p.toURLValues()) if err != nil { return nil, err } var r InternalLoadBalancerElementResponse 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", "*", "InternalLBService", ")", "ConfigureInternalLoadBalancerElement", "(", "p", "*", "ConfigureInternalLoadBalancerElementParams", ")", "(", "*", "InternalLoadBalancerElementResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "InternalLoadBalancerElementResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Configures an Internal Load Balancer element.
[ "Configures", "an", "Internal", "Load", "Balancer", "element", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/InternalLBService.go#L73-L105
train
xanzy/go-cloudstack
cloudstack/InternalLBService.go
NewCreateInternalLoadBalancerElementParams
func (s *InternalLBService) NewCreateInternalLoadBalancerElementParams(nspid string) *CreateInternalLoadBalancerElementParams { p := &CreateInternalLoadBalancerElementParams{} p.p = make(map[string]interface{}) p.p["nspid"] = nspid return p }
go
func (s *InternalLBService) NewCreateInternalLoadBalancerElementParams(nspid string) *CreateInternalLoadBalancerElementParams { p := &CreateInternalLoadBalancerElementParams{} p.p = make(map[string]interface{}) p.p["nspid"] = nspid return p }
[ "func", "(", "s", "*", "InternalLBService", ")", "NewCreateInternalLoadBalancerElementParams", "(", "nspid", "string", ")", "*", "CreateInternalLoadBalancerElementParams", "{", "p", ":=", "&", "CreateInternalLoadBalancerElementParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "nspid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateInternalLoadBalancerElementParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateInternalLoadBalancerElementParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/InternalLBService.go#L139-L144
train
xanzy/go-cloudstack
cloudstack/InternalLBService.go
CreateInternalLoadBalancerElement
func (s *InternalLBService) CreateInternalLoadBalancerElement(p *CreateInternalLoadBalancerElementParams) (*CreateInternalLoadBalancerElementResponse, error) { resp, err := s.cs.newRequest("createInternalLoadBalancerElement", p.toURLValues()) if err != nil { return nil, err } var r CreateInternalLoadBalancerElementResponse 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 *InternalLBService) CreateInternalLoadBalancerElement(p *CreateInternalLoadBalancerElementParams) (*CreateInternalLoadBalancerElementResponse, error) { resp, err := s.cs.newRequest("createInternalLoadBalancerElement", p.toURLValues()) if err != nil { return nil, err } var r CreateInternalLoadBalancerElementResponse 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", "*", "InternalLBService", ")", "CreateInternalLoadBalancerElement", "(", "p", "*", "CreateInternalLoadBalancerElementParams", ")", "(", "*", "CreateInternalLoadBalancerElementResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateInternalLoadBalancerElementResponse", "\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", "}" ]
// Create an Internal Load Balancer element.
[ "Create", "an", "Internal", "Load", "Balancer", "element", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/InternalLBService.go#L147-L179
train
xanzy/go-cloudstack
cloudstack/InternalLBService.go
NewListInternalLoadBalancerElementsParams
func (s *InternalLBService) NewListInternalLoadBalancerElementsParams() *ListInternalLoadBalancerElementsParams { p := &ListInternalLoadBalancerElementsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *InternalLBService) NewListInternalLoadBalancerElementsParams() *ListInternalLoadBalancerElementsParams { p := &ListInternalLoadBalancerElementsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "InternalLBService", ")", "NewListInternalLoadBalancerElementsParams", "(", ")", "*", "ListInternalLoadBalancerElementsParams", "{", "p", ":=", "&", "ListInternalLoadBalancerElementsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListInternalLoadBalancerElementsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListInternalLoadBalancerElementsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/InternalLBService.go#L271-L275
train
xanzy/go-cloudstack
cloudstack/InternalLBService.go
ListInternalLoadBalancerElements
func (s *InternalLBService) ListInternalLoadBalancerElements(p *ListInternalLoadBalancerElementsParams) (*ListInternalLoadBalancerElementsResponse, error) { resp, err := s.cs.newRequest("listInternalLoadBalancerElements", p.toURLValues()) if err != nil { return nil, err } var r ListInternalLoadBalancerElementsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *InternalLBService) ListInternalLoadBalancerElements(p *ListInternalLoadBalancerElementsParams) (*ListInternalLoadBalancerElementsResponse, error) { resp, err := s.cs.newRequest("listInternalLoadBalancerElements", p.toURLValues()) if err != nil { return nil, err } var r ListInternalLoadBalancerElementsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "InternalLBService", ")", "ListInternalLoadBalancerElements", "(", "p", "*", "ListInternalLoadBalancerElementsParams", ")", "(", "*", "ListInternalLoadBalancerElementsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListInternalLoadBalancerElementsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists all available Internal Load Balancer elements.
[ "Lists", "all", "available", "Internal", "Load", "Balancer", "elements", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/InternalLBService.go#L311-L323
train
xanzy/go-cloudstack
cloudstack/InternalLBService.go
NewListInternalLoadBalancerVMsParams
func (s *InternalLBService) NewListInternalLoadBalancerVMsParams() *ListInternalLoadBalancerVMsParams { p := &ListInternalLoadBalancerVMsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *InternalLBService) NewListInternalLoadBalancerVMsParams() *ListInternalLoadBalancerVMsParams { p := &ListInternalLoadBalancerVMsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "InternalLBService", ")", "NewListInternalLoadBalancerVMsParams", "(", ")", "*", "ListInternalLoadBalancerVMsParams", "{", "p", ":=", "&", "ListInternalLoadBalancerVMsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListInternalLoadBalancerVMsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListInternalLoadBalancerVMsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/InternalLBService.go#L542-L546
train
xanzy/go-cloudstack
cloudstack/InternalLBService.go
ListInternalLoadBalancerVMs
func (s *InternalLBService) ListInternalLoadBalancerVMs(p *ListInternalLoadBalancerVMsParams) (*ListInternalLoadBalancerVMsResponse, error) { resp, err := s.cs.newRequest("listInternalLoadBalancerVMs", p.toURLValues()) if err != nil { return nil, err } var r ListInternalLoadBalancerVMsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *InternalLBService) ListInternalLoadBalancerVMs(p *ListInternalLoadBalancerVMsParams) (*ListInternalLoadBalancerVMsResponse, error) { resp, err := s.cs.newRequest("listInternalLoadBalancerVMs", p.toURLValues()) if err != nil { return nil, err } var r ListInternalLoadBalancerVMsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "InternalLBService", ")", "ListInternalLoadBalancerVMs", "(", "p", "*", "ListInternalLoadBalancerVMsParams", ")", "(", "*", "ListInternalLoadBalancerVMsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListInternalLoadBalancerVMsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// List internal LB VMs.
[ "List", "internal", "LB", "VMs", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/InternalLBService.go#L632-L644
train
xanzy/go-cloudstack
cloudstack/InternalLBService.go
NewStartInternalLoadBalancerVMParams
func (s *InternalLBService) NewStartInternalLoadBalancerVMParams(id string) *StartInternalLoadBalancerVMParams { p := &StartInternalLoadBalancerVMParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *InternalLBService) NewStartInternalLoadBalancerVMParams(id string) *StartInternalLoadBalancerVMParams { p := &StartInternalLoadBalancerVMParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "InternalLBService", ")", "NewStartInternalLoadBalancerVMParams", "(", "id", "string", ")", "*", "StartInternalLoadBalancerVMParams", "{", "p", ":=", "&", "StartInternalLoadBalancerVMParams", "{", "}", "\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 StartInternalLoadBalancerVMParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "StartInternalLoadBalancerVMParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/InternalLBService.go#L725-L730
train
xanzy/go-cloudstack
cloudstack/InternalLBService.go
StartInternalLoadBalancerVM
func (s *InternalLBService) StartInternalLoadBalancerVM(p *StartInternalLoadBalancerVMParams) (*StartInternalLoadBalancerVMResponse, error) { resp, err := s.cs.newRequest("startInternalLoadBalancerVM", p.toURLValues()) if err != nil { return nil, err } var r StartInternalLoadBalancerVMResponse 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 *InternalLBService) StartInternalLoadBalancerVM(p *StartInternalLoadBalancerVMParams) (*StartInternalLoadBalancerVMResponse, error) { resp, err := s.cs.newRequest("startInternalLoadBalancerVM", p.toURLValues()) if err != nil { return nil, err } var r StartInternalLoadBalancerVMResponse 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", "*", "InternalLBService", ")", "StartInternalLoadBalancerVM", "(", "p", "*", "StartInternalLoadBalancerVMParams", ")", "(", "*", "StartInternalLoadBalancerVMResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "StartInternalLoadBalancerVMResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Starts an existing internal lb vm.
[ "Starts", "an", "existing", "internal", "lb", "vm", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/InternalLBService.go#L733-L765
train
xanzy/go-cloudstack
cloudstack/InternalLBService.go
NewStopInternalLoadBalancerVMParams
func (s *InternalLBService) NewStopInternalLoadBalancerVMParams(id string) *StopInternalLoadBalancerVMParams { p := &StopInternalLoadBalancerVMParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *InternalLBService) NewStopInternalLoadBalancerVMParams(id string) *StopInternalLoadBalancerVMParams { p := &StopInternalLoadBalancerVMParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "InternalLBService", ")", "NewStopInternalLoadBalancerVMParams", "(", "id", "string", ")", "*", "StopInternalLoadBalancerVMParams", "{", "p", ":=", "&", "StopInternalLoadBalancerVMParams", "{", "}", "\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 StopInternalLoadBalancerVMParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "StopInternalLoadBalancerVMParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/InternalLBService.go#L854-L859
train
xanzy/go-cloudstack
cloudstack/InternalLBService.go
StopInternalLoadBalancerVM
func (s *InternalLBService) StopInternalLoadBalancerVM(p *StopInternalLoadBalancerVMParams) (*StopInternalLoadBalancerVMResponse, error) { resp, err := s.cs.newRequest("stopInternalLoadBalancerVM", p.toURLValues()) if err != nil { return nil, err } var r StopInternalLoadBalancerVMResponse 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 *InternalLBService) StopInternalLoadBalancerVM(p *StopInternalLoadBalancerVMParams) (*StopInternalLoadBalancerVMResponse, error) { resp, err := s.cs.newRequest("stopInternalLoadBalancerVM", p.toURLValues()) if err != nil { return nil, err } var r StopInternalLoadBalancerVMResponse 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", "*", "InternalLBService", ")", "StopInternalLoadBalancerVM", "(", "p", "*", "StopInternalLoadBalancerVMParams", ")", "(", "*", "StopInternalLoadBalancerVMResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "StopInternalLoadBalancerVMResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Stops an Internal LB vm.
[ "Stops", "an", "Internal", "LB", "vm", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/InternalLBService.go#L862-L894
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewAddPaloAltoFirewallParams
func (s *FirewallService) NewAddPaloAltoFirewallParams(networkdevicetype string, password string, physicalnetworkid string, url string, username string) *AddPaloAltoFirewallParams { p := &AddPaloAltoFirewallParams{} p.p = make(map[string]interface{}) p.p["networkdevicetype"] = networkdevicetype p.p["password"] = password p.p["physicalnetworkid"] = physicalnetworkid p.p["url"] = url p.p["username"] = username return p }
go
func (s *FirewallService) NewAddPaloAltoFirewallParams(networkdevicetype string, password string, physicalnetworkid string, url string, username string) *AddPaloAltoFirewallParams { p := &AddPaloAltoFirewallParams{} p.p = make(map[string]interface{}) p.p["networkdevicetype"] = networkdevicetype p.p["password"] = password p.p["physicalnetworkid"] = physicalnetworkid p.p["url"] = url p.p["username"] = username return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewAddPaloAltoFirewallParams", "(", "networkdevicetype", "string", ",", "password", "string", ",", "physicalnetworkid", "string", ",", "url", "string", ",", "username", "string", ")", "*", "AddPaloAltoFirewallParams", "{", "p", ":=", "&", "AddPaloAltoFirewallParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "networkdevicetype", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "password", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "physicalnetworkid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "url", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "username", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AddPaloAltoFirewallParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddPaloAltoFirewallParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L146-L155
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
AddPaloAltoFirewall
func (s *FirewallService) AddPaloAltoFirewall(p *AddPaloAltoFirewallParams) (*AddPaloAltoFirewallResponse, error) { resp, err := s.cs.newRequest("addPaloAltoFirewall", p.toURLValues()) if err != nil { return nil, err } var r AddPaloAltoFirewallResponse 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 } b, err = convertFirewallServiceResponse(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *FirewallService) AddPaloAltoFirewall(p *AddPaloAltoFirewallParams) (*AddPaloAltoFirewallResponse, error) { resp, err := s.cs.newRequest("addPaloAltoFirewall", p.toURLValues()) if err != nil { return nil, err } var r AddPaloAltoFirewallResponse 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 } b, err = convertFirewallServiceResponse(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "FirewallService", ")", "AddPaloAltoFirewall", "(", "p", "*", "AddPaloAltoFirewallParams", ")", "(", "*", "AddPaloAltoFirewallResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "AddPaloAltoFirewallResponse", "\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", "b", ",", "err", "=", "convertFirewallServiceResponse", "(", "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 Palo Alto firewall device
[ "Adds", "a", "Palo", "Alto", "firewall", "device" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L158-L195
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewConfigurePaloAltoFirewallParams
func (s *FirewallService) NewConfigurePaloAltoFirewallParams(fwdeviceid string) *ConfigurePaloAltoFirewallParams { p := &ConfigurePaloAltoFirewallParams{} p.p = make(map[string]interface{}) p.p["fwdeviceid"] = fwdeviceid return p }
go
func (s *FirewallService) NewConfigurePaloAltoFirewallParams(fwdeviceid string) *ConfigurePaloAltoFirewallParams { p := &ConfigurePaloAltoFirewallParams{} p.p = make(map[string]interface{}) p.p["fwdeviceid"] = fwdeviceid return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewConfigurePaloAltoFirewallParams", "(", "fwdeviceid", "string", ")", "*", "ConfigurePaloAltoFirewallParams", "{", "p", ":=", "&", "ConfigurePaloAltoFirewallParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "fwdeviceid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ConfigurePaloAltoFirewallParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ConfigurePaloAltoFirewallParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L254-L259
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
ConfigurePaloAltoFirewall
func (s *FirewallService) ConfigurePaloAltoFirewall(p *ConfigurePaloAltoFirewallParams) (*PaloAltoFirewallResponse, error) { resp, err := s.cs.newRequest("configurePaloAltoFirewall", p.toURLValues()) if err != nil { return nil, err } var r PaloAltoFirewallResponse 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 } b, err = convertFirewallServiceResponse(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *FirewallService) ConfigurePaloAltoFirewall(p *ConfigurePaloAltoFirewallParams) (*PaloAltoFirewallResponse, error) { resp, err := s.cs.newRequest("configurePaloAltoFirewall", p.toURLValues()) if err != nil { return nil, err } var r PaloAltoFirewallResponse 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 } b, err = convertFirewallServiceResponse(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "FirewallService", ")", "ConfigurePaloAltoFirewall", "(", "p", "*", "ConfigurePaloAltoFirewallParams", ")", "(", "*", "PaloAltoFirewallResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "PaloAltoFirewallResponse", "\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", "b", ",", "err", "=", "convertFirewallServiceResponse", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Configures a Palo Alto firewall device
[ "Configures", "a", "Palo", "Alto", "firewall", "device" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L262-L299
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewCreateEgressFirewallRuleParams
func (s *FirewallService) NewCreateEgressFirewallRuleParams(networkid string, protocol string) *CreateEgressFirewallRuleParams { p := &CreateEgressFirewallRuleParams{} p.p = make(map[string]interface{}) p.p["networkid"] = networkid p.p["protocol"] = protocol return p }
go
func (s *FirewallService) NewCreateEgressFirewallRuleParams(networkid string, protocol string) *CreateEgressFirewallRuleParams { p := &CreateEgressFirewallRuleParams{} p.p = make(map[string]interface{}) p.p["networkid"] = networkid p.p["protocol"] = protocol return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewCreateEgressFirewallRuleParams", "(", "networkid", "string", ",", "protocol", "string", ")", "*", "CreateEgressFirewallRuleParams", "{", "p", ":=", "&", "CreateEgressFirewallRuleParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "networkid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "protocol", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateEgressFirewallRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateEgressFirewallRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L452-L458
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewCreateFirewallRuleParams
func (s *FirewallService) NewCreateFirewallRuleParams(ipaddressid string, protocol string) *CreateFirewallRuleParams { p := &CreateFirewallRuleParams{} p.p = make(map[string]interface{}) p.p["ipaddressid"] = ipaddressid p.p["protocol"] = protocol return p }
go
func (s *FirewallService) NewCreateFirewallRuleParams(ipaddressid string, protocol string) *CreateFirewallRuleParams { p := &CreateFirewallRuleParams{} p.p = make(map[string]interface{}) p.p["ipaddressid"] = ipaddressid p.p["protocol"] = protocol return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewCreateFirewallRuleParams", "(", "ipaddressid", "string", ",", "protocol", "string", ")", "*", "CreateFirewallRuleParams", "{", "p", ":=", "&", "CreateFirewallRuleParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "ipaddressid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "protocol", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateFirewallRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateFirewallRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L637-L643
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
CreateFirewallRule
func (s *FirewallService) CreateFirewallRule(p *CreateFirewallRuleParams) (*CreateFirewallRuleResponse, error) { resp, err := s.cs.newRequest("createFirewallRule", p.toURLValues()) if err != nil { return nil, err } var r CreateFirewallRuleResponse 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 } b, err = convertFirewallServiceResponse(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *FirewallService) CreateFirewallRule(p *CreateFirewallRuleParams) (*CreateFirewallRuleResponse, error) { resp, err := s.cs.newRequest("createFirewallRule", p.toURLValues()) if err != nil { return nil, err } var r CreateFirewallRuleResponse 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 } b, err = convertFirewallServiceResponse(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "FirewallService", ")", "CreateFirewallRule", "(", "p", "*", "CreateFirewallRuleParams", ")", "(", "*", "CreateFirewallRuleResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateFirewallRuleResponse", "\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", "b", ",", "err", "=", "convertFirewallServiceResponse", "(", "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 firewall rule for a given IP address
[ "Creates", "a", "firewall", "rule", "for", "a", "given", "IP", "address" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L646-L683
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewCreatePortForwardingRuleParams
func (s *FirewallService) NewCreatePortForwardingRuleParams(ipaddressid string, privateport int, protocol string, publicport int, virtualmachineid string) *CreatePortForwardingRuleParams { p := &CreatePortForwardingRuleParams{} p.p = make(map[string]interface{}) p.p["ipaddressid"] = ipaddressid p.p["privateport"] = privateport p.p["protocol"] = protocol p.p["publicport"] = publicport p.p["virtualmachineid"] = virtualmachineid return p }
go
func (s *FirewallService) NewCreatePortForwardingRuleParams(ipaddressid string, privateport int, protocol string, publicport int, virtualmachineid string) *CreatePortForwardingRuleParams { p := &CreatePortForwardingRuleParams{} p.p = make(map[string]interface{}) p.p["ipaddressid"] = ipaddressid p.p["privateport"] = privateport p.p["protocol"] = protocol p.p["publicport"] = publicport p.p["virtualmachineid"] = virtualmachineid return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewCreatePortForwardingRuleParams", "(", "ipaddressid", "string", ",", "privateport", "int", ",", "protocol", "string", ",", "publicport", "int", ",", "virtualmachineid", "string", ")", "*", "CreatePortForwardingRuleParams", "{", "p", ":=", "&", "CreatePortForwardingRuleParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "ipaddressid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "privateport", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "protocol", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "publicport", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "virtualmachineid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreatePortForwardingRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreatePortForwardingRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L856-L865
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewDeleteEgressFirewallRuleParams
func (s *FirewallService) NewDeleteEgressFirewallRuleParams(id string) *DeleteEgressFirewallRuleParams { p := &DeleteEgressFirewallRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *FirewallService) NewDeleteEgressFirewallRuleParams(id string) *DeleteEgressFirewallRuleParams { p := &DeleteEgressFirewallRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewDeleteEgressFirewallRuleParams", "(", "id", "string", ")", "*", "DeleteEgressFirewallRuleParams", "{", "p", ":=", "&", "DeleteEgressFirewallRuleParams", "{", "}", "\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 DeleteEgressFirewallRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteEgressFirewallRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L953-L958
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
DeleteEgressFirewallRule
func (s *FirewallService) DeleteEgressFirewallRule(p *DeleteEgressFirewallRuleParams) (*DeleteEgressFirewallRuleResponse, error) { resp, err := s.cs.newRequest("deleteEgressFirewallRule", p.toURLValues()) if err != nil { return nil, err } var r DeleteEgressFirewallRuleResponse 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 = convertFirewallServiceResponse(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *FirewallService) DeleteEgressFirewallRule(p *DeleteEgressFirewallRuleParams) (*DeleteEgressFirewallRuleResponse, error) { resp, err := s.cs.newRequest("deleteEgressFirewallRule", p.toURLValues()) if err != nil { return nil, err } var r DeleteEgressFirewallRuleResponse 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 = convertFirewallServiceResponse(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "FirewallService", ")", "DeleteEgressFirewallRule", "(", "p", "*", "DeleteEgressFirewallRuleParams", ")", "(", "*", "DeleteEgressFirewallRuleResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteEgressFirewallRuleResponse", "\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", "=", "convertFirewallServiceResponse", "(", "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", "}" ]
// Deletes an egress firewall rule
[ "Deletes", "an", "egress", "firewall", "rule" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L961-L993
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewDeleteFirewallRuleParams
func (s *FirewallService) NewDeleteFirewallRuleParams(id string) *DeleteFirewallRuleParams { p := &DeleteFirewallRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *FirewallService) NewDeleteFirewallRuleParams(id string) *DeleteFirewallRuleParams { p := &DeleteFirewallRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewDeleteFirewallRuleParams", "(", "id", "string", ")", "*", "DeleteFirewallRuleParams", "{", "p", ":=", "&", "DeleteFirewallRuleParams", "{", "}", "\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 DeleteFirewallRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteFirewallRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L1026-L1031
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewDeletePaloAltoFirewallParams
func (s *FirewallService) NewDeletePaloAltoFirewallParams(fwdeviceid string) *DeletePaloAltoFirewallParams { p := &DeletePaloAltoFirewallParams{} p.p = make(map[string]interface{}) p.p["fwdeviceid"] = fwdeviceid return p }
go
func (s *FirewallService) NewDeletePaloAltoFirewallParams(fwdeviceid string) *DeletePaloAltoFirewallParams { p := &DeletePaloAltoFirewallParams{} p.p = make(map[string]interface{}) p.p["fwdeviceid"] = fwdeviceid return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewDeletePaloAltoFirewallParams", "(", "fwdeviceid", "string", ")", "*", "DeletePaloAltoFirewallParams", "{", "p", ":=", "&", "DeletePaloAltoFirewallParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "fwdeviceid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeletePaloAltoFirewallParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeletePaloAltoFirewallParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L1099-L1104
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
DeletePaloAltoFirewall
func (s *FirewallService) DeletePaloAltoFirewall(p *DeletePaloAltoFirewallParams) (*DeletePaloAltoFirewallResponse, error) { resp, err := s.cs.newRequest("deletePaloAltoFirewall", p.toURLValues()) if err != nil { return nil, err } var r DeletePaloAltoFirewallResponse 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 = convertFirewallServiceResponse(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *FirewallService) DeletePaloAltoFirewall(p *DeletePaloAltoFirewallParams) (*DeletePaloAltoFirewallResponse, error) { resp, err := s.cs.newRequest("deletePaloAltoFirewall", p.toURLValues()) if err != nil { return nil, err } var r DeletePaloAltoFirewallResponse 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 = convertFirewallServiceResponse(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "FirewallService", ")", "DeletePaloAltoFirewall", "(", "p", "*", "DeletePaloAltoFirewallParams", ")", "(", "*", "DeletePaloAltoFirewallResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeletePaloAltoFirewallResponse", "\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", "=", "convertFirewallServiceResponse", "(", "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", "}" ]
// delete a Palo Alto firewall device
[ "delete", "a", "Palo", "Alto", "firewall", "device" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L1107-L1139
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewDeletePortForwardingRuleParams
func (s *FirewallService) NewDeletePortForwardingRuleParams(id string) *DeletePortForwardingRuleParams { p := &DeletePortForwardingRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *FirewallService) NewDeletePortForwardingRuleParams(id string) *DeletePortForwardingRuleParams { p := &DeletePortForwardingRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewDeletePortForwardingRuleParams", "(", "id", "string", ")", "*", "DeletePortForwardingRuleParams", "{", "p", ":=", "&", "DeletePortForwardingRuleParams", "{", "}", "\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 DeletePortForwardingRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeletePortForwardingRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L1172-L1177
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewListEgressFirewallRulesParams
func (s *FirewallService) NewListEgressFirewallRulesParams() *ListEgressFirewallRulesParams { p := &ListEgressFirewallRulesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *FirewallService) NewListEgressFirewallRulesParams() *ListEgressFirewallRulesParams { p := &ListEgressFirewallRulesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewListEgressFirewallRulesParams", "(", ")", "*", "ListEgressFirewallRulesParams", "{", "p", ":=", "&", "ListEgressFirewallRulesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListEgressFirewallRulesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListEgressFirewallRulesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L1387-L1391
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
ListEgressFirewallRules
func (s *FirewallService) ListEgressFirewallRules(p *ListEgressFirewallRulesParams) (*ListEgressFirewallRulesResponse, error) { resp, err := s.cs.newRequest("listEgressFirewallRules", p.toURLValues()) if err != nil { return nil, err } resp, err = convertFirewallServiceResponse(resp) if err != nil { return nil, err } var r ListEgressFirewallRulesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *FirewallService) ListEgressFirewallRules(p *ListEgressFirewallRulesParams) (*ListEgressFirewallRulesResponse, error) { resp, err := s.cs.newRequest("listEgressFirewallRules", p.toURLValues()) if err != nil { return nil, err } resp, err = convertFirewallServiceResponse(resp) if err != nil { return nil, err } var r ListEgressFirewallRulesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "FirewallService", ")", "ListEgressFirewallRules", "(", "p", "*", "ListEgressFirewallRulesParams", ")", "(", "*", "ListEgressFirewallRulesResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "resp", ",", "err", "=", "convertFirewallServiceResponse", "(", "resp", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListEgressFirewallRulesResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists all egress firewall rules for network ID.
[ "Lists", "all", "egress", "firewall", "rules", "for", "network", "ID", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L1427-L1444
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewListFirewallRulesParams
func (s *FirewallService) NewListFirewallRulesParams() *ListFirewallRulesParams { p := &ListFirewallRulesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *FirewallService) NewListFirewallRulesParams() *ListFirewallRulesParams { p := &ListFirewallRulesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewListFirewallRulesParams", "(", ")", "*", "ListFirewallRulesParams", "{", "p", ":=", "&", "ListFirewallRulesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListFirewallRulesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListFirewallRulesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L1635-L1639
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewListPaloAltoFirewallsParams
func (s *FirewallService) NewListPaloAltoFirewallsParams() *ListPaloAltoFirewallsParams { p := &ListPaloAltoFirewallsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *FirewallService) NewListPaloAltoFirewallsParams() *ListPaloAltoFirewallsParams { p := &ListPaloAltoFirewallsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewListPaloAltoFirewallsParams", "(", ")", "*", "ListPaloAltoFirewallsParams", "{", "p", ":=", "&", "ListPaloAltoFirewallsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListPaloAltoFirewallsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListPaloAltoFirewallsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L1787-L1791
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
ListPaloAltoFirewalls
func (s *FirewallService) ListPaloAltoFirewalls(p *ListPaloAltoFirewallsParams) (*ListPaloAltoFirewallsResponse, error) { resp, err := s.cs.newRequest("listPaloAltoFirewalls", p.toURLValues()) if err != nil { return nil, err } resp, err = convertFirewallServiceResponse(resp) if err != nil { return nil, err } var r ListPaloAltoFirewallsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *FirewallService) ListPaloAltoFirewalls(p *ListPaloAltoFirewallsParams) (*ListPaloAltoFirewallsResponse, error) { resp, err := s.cs.newRequest("listPaloAltoFirewalls", p.toURLValues()) if err != nil { return nil, err } resp, err = convertFirewallServiceResponse(resp) if err != nil { return nil, err } var r ListPaloAltoFirewallsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "FirewallService", ")", "ListPaloAltoFirewalls", "(", "p", "*", "ListPaloAltoFirewallsParams", ")", "(", "*", "ListPaloAltoFirewallsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "resp", ",", "err", "=", "convertFirewallServiceResponse", "(", "resp", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListPaloAltoFirewallsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// lists Palo Alto firewall devices in a physical network
[ "lists", "Palo", "Alto", "firewall", "devices", "in", "a", "physical", "network" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L1794-L1811
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewListPortForwardingRulesParams
func (s *FirewallService) NewListPortForwardingRulesParams() *ListPortForwardingRulesParams { p := &ListPortForwardingRulesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *FirewallService) NewListPortForwardingRulesParams() *ListPortForwardingRulesParams { p := &ListPortForwardingRulesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewListPortForwardingRulesParams", "(", ")", "*", "ListPortForwardingRulesParams", "{", "p", ":=", "&", "ListPortForwardingRulesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListPortForwardingRulesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListPortForwardingRulesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L2004-L2008
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewUpdateEgressFirewallRuleParams
func (s *FirewallService) NewUpdateEgressFirewallRuleParams(id string) *UpdateEgressFirewallRuleParams { p := &UpdateEgressFirewallRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *FirewallService) NewUpdateEgressFirewallRuleParams(id string) *UpdateEgressFirewallRuleParams { p := &UpdateEgressFirewallRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewUpdateEgressFirewallRuleParams", "(", "id", "string", ")", "*", "UpdateEgressFirewallRuleParams", "{", "p", ":=", "&", "UpdateEgressFirewallRuleParams", "{", "}", "\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 UpdateEgressFirewallRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateEgressFirewallRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L2136-L2141
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewUpdateFirewallRuleParams
func (s *FirewallService) NewUpdateFirewallRuleParams(id string) *UpdateFirewallRuleParams { p := &UpdateFirewallRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *FirewallService) NewUpdateFirewallRuleParams(id string) *UpdateFirewallRuleParams { p := &UpdateFirewallRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewUpdateFirewallRuleParams", "(", "id", "string", ")", "*", "UpdateFirewallRuleParams", "{", "p", ":=", "&", "UpdateFirewallRuleParams", "{", "}", "\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 UpdateFirewallRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateFirewallRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L2249-L2254
train
xanzy/go-cloudstack
cloudstack/FirewallService.go
NewUpdatePortForwardingRuleParams
func (s *FirewallService) NewUpdatePortForwardingRuleParams(id string) *UpdatePortForwardingRuleParams { p := &UpdatePortForwardingRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *FirewallService) NewUpdatePortForwardingRuleParams(id string) *UpdatePortForwardingRuleParams { p := &UpdatePortForwardingRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "FirewallService", ")", "NewUpdatePortForwardingRuleParams", "(", "id", "string", ")", "*", "UpdatePortForwardingRuleParams", "{", "p", ":=", "&", "UpdatePortForwardingRuleParams", "{", "}", "\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 UpdatePortForwardingRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdatePortForwardingRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/FirewallService.go#L2408-L2413
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewAddVpnUserParams
func (s *VPNService) NewAddVpnUserParams(password string, username string) *AddVpnUserParams { p := &AddVpnUserParams{} p.p = make(map[string]interface{}) p.p["password"] = password p.p["username"] = username return p }
go
func (s *VPNService) NewAddVpnUserParams(password string, username string) *AddVpnUserParams { p := &AddVpnUserParams{} p.p = make(map[string]interface{}) p.p["password"] = password p.p["username"] = username return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewAddVpnUserParams", "(", "password", "string", ",", "username", "string", ")", "*", "AddVpnUserParams", "{", "p", ":=", "&", "AddVpnUserParams", "{", "}", "\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 AddVpnUserParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddVpnUserParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L96-L102
train
xanzy/go-cloudstack
cloudstack/VPNService.go
AddVpnUser
func (s *VPNService) AddVpnUser(p *AddVpnUserParams) (*AddVpnUserResponse, error) { resp, err := s.cs.newRequest("addVpnUser", p.toURLValues()) if err != nil { return nil, err } var r AddVpnUserResponse 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 *VPNService) AddVpnUser(p *AddVpnUserParams) (*AddVpnUserResponse, error) { resp, err := s.cs.newRequest("addVpnUser", p.toURLValues()) if err != nil { return nil, err } var r AddVpnUserResponse 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", "*", "VPNService", ")", "AddVpnUser", "(", "p", "*", "AddVpnUserParams", ")", "(", "*", "AddVpnUserResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "AddVpnUserResponse", "\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 vpn users
[ "Adds", "vpn", "users" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L105-L137
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewCreateRemoteAccessVpnParams
func (s *VPNService) NewCreateRemoteAccessVpnParams(publicipid string) *CreateRemoteAccessVpnParams { p := &CreateRemoteAccessVpnParams{} p.p = make(map[string]interface{}) p.p["publicipid"] = publicipid return p }
go
func (s *VPNService) NewCreateRemoteAccessVpnParams(publicipid string) *CreateRemoteAccessVpnParams { p := &CreateRemoteAccessVpnParams{} p.p = make(map[string]interface{}) p.p["publicipid"] = publicipid return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewCreateRemoteAccessVpnParams", "(", "publicipid", "string", ")", "*", "CreateRemoteAccessVpnParams", "{", "p", ":=", "&", "CreateRemoteAccessVpnParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "publicipid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateRemoteAccessVpnParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateRemoteAccessVpnParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L233-L238
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewCreateVpnConnectionParams
func (s *VPNService) NewCreateVpnConnectionParams(s2scustomergatewayid string, s2svpngatewayid string) *CreateVpnConnectionParams { p := &CreateVpnConnectionParams{} p.p = make(map[string]interface{}) p.p["s2scustomergatewayid"] = s2scustomergatewayid p.p["s2svpngatewayid"] = s2svpngatewayid return p }
go
func (s *VPNService) NewCreateVpnConnectionParams(s2scustomergatewayid string, s2svpngatewayid string) *CreateVpnConnectionParams { p := &CreateVpnConnectionParams{} p.p = make(map[string]interface{}) p.p["s2scustomergatewayid"] = s2scustomergatewayid p.p["s2svpngatewayid"] = s2svpngatewayid return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewCreateVpnConnectionParams", "(", "s2scustomergatewayid", "string", ",", "s2svpngatewayid", "string", ")", "*", "CreateVpnConnectionParams", "{", "p", ":=", "&", "CreateVpnConnectionParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "s2scustomergatewayid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "s2svpngatewayid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateVpnConnectionParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateVpnConnectionParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L351-L357
train
xanzy/go-cloudstack
cloudstack/VPNService.go
CreateVpnConnection
func (s *VPNService) CreateVpnConnection(p *CreateVpnConnectionParams) (*CreateVpnConnectionResponse, error) { resp, err := s.cs.newRequest("createVpnConnection", p.toURLValues()) if err != nil { return nil, err } var r CreateVpnConnectionResponse 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 *VPNService) CreateVpnConnection(p *CreateVpnConnectionParams) (*CreateVpnConnectionResponse, error) { resp, err := s.cs.newRequest("createVpnConnection", p.toURLValues()) if err != nil { return nil, err } var r CreateVpnConnectionResponse 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", "*", "VPNService", ")", "CreateVpnConnection", "(", "p", "*", "CreateVpnConnectionParams", ")", "(", "*", "CreateVpnConnectionResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateVpnConnectionResponse", "\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", "}" ]
// Create site to site vpn connection
[ "Create", "site", "to", "site", "vpn", "connection" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L360-L392
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewCreateVpnCustomerGatewayParams
func (s *VPNService) NewCreateVpnCustomerGatewayParams(cidrlist string, esppolicy string, gateway string, ikepolicy string, ipsecpsk string) *CreateVpnCustomerGatewayParams { p := &CreateVpnCustomerGatewayParams{} p.p = make(map[string]interface{}) p.p["cidrlist"] = cidrlist p.p["esppolicy"] = esppolicy p.p["gateway"] = gateway p.p["ikepolicy"] = ikepolicy p.p["ipsecpsk"] = ipsecpsk return p }
go
func (s *VPNService) NewCreateVpnCustomerGatewayParams(cidrlist string, esppolicy string, gateway string, ikepolicy string, ipsecpsk string) *CreateVpnCustomerGatewayParams { p := &CreateVpnCustomerGatewayParams{} p.p = make(map[string]interface{}) p.p["cidrlist"] = cidrlist p.p["esppolicy"] = esppolicy p.p["gateway"] = gateway p.p["ikepolicy"] = ikepolicy p.p["ipsecpsk"] = ipsecpsk return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewCreateVpnCustomerGatewayParams", "(", "cidrlist", "string", ",", "esppolicy", "string", ",", "gateway", "string", ",", "ikepolicy", "string", ",", "ipsecpsk", "string", ")", "*", "CreateVpnCustomerGatewayParams", "{", "p", ":=", "&", "CreateVpnCustomerGatewayParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "cidrlist", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "esppolicy", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "gateway", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "ikepolicy", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "ipsecpsk", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateVpnCustomerGatewayParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateVpnCustomerGatewayParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L582-L591
train
xanzy/go-cloudstack
cloudstack/VPNService.go
CreateVpnCustomerGateway
func (s *VPNService) CreateVpnCustomerGateway(p *CreateVpnCustomerGatewayParams) (*CreateVpnCustomerGatewayResponse, error) { resp, err := s.cs.newRequest("createVpnCustomerGateway", p.toURLValues()) if err != nil { return nil, err } var r CreateVpnCustomerGatewayResponse 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 *VPNService) CreateVpnCustomerGateway(p *CreateVpnCustomerGatewayParams) (*CreateVpnCustomerGatewayResponse, error) { resp, err := s.cs.newRequest("createVpnCustomerGateway", p.toURLValues()) if err != nil { return nil, err } var r CreateVpnCustomerGatewayResponse 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", "*", "VPNService", ")", "CreateVpnCustomerGateway", "(", "p", "*", "CreateVpnCustomerGatewayParams", ")", "(", "*", "CreateVpnCustomerGatewayResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateVpnCustomerGatewayResponse", "\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 site to site vpn customer gateway
[ "Creates", "site", "to", "site", "vpn", "customer", "gateway" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L594-L626
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewCreateVpnGatewayParams
func (s *VPNService) NewCreateVpnGatewayParams(vpcid string) *CreateVpnGatewayParams { p := &CreateVpnGatewayParams{} p.p = make(map[string]interface{}) p.p["vpcid"] = vpcid return p }
go
func (s *VPNService) NewCreateVpnGatewayParams(vpcid string) *CreateVpnGatewayParams { p := &CreateVpnGatewayParams{} p.p = make(map[string]interface{}) p.p["vpcid"] = vpcid return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewCreateVpnGatewayParams", "(", "vpcid", "string", ")", "*", "CreateVpnGatewayParams", "{", "p", ":=", "&", "CreateVpnGatewayParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "vpcid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateVpnGatewayParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateVpnGatewayParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L687-L692
train
xanzy/go-cloudstack
cloudstack/VPNService.go
CreateVpnGateway
func (s *VPNService) CreateVpnGateway(p *CreateVpnGatewayParams) (*CreateVpnGatewayResponse, error) { resp, err := s.cs.newRequest("createVpnGateway", p.toURLValues()) if err != nil { return nil, err } var r CreateVpnGatewayResponse 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 *VPNService) CreateVpnGateway(p *CreateVpnGatewayParams) (*CreateVpnGatewayResponse, error) { resp, err := s.cs.newRequest("createVpnGateway", p.toURLValues()) if err != nil { return nil, err } var r CreateVpnGatewayResponse 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", "*", "VPNService", ")", "CreateVpnGateway", "(", "p", "*", "CreateVpnGatewayParams", ")", "(", "*", "CreateVpnGatewayResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateVpnGatewayResponse", "\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 site to site vpn local gateway
[ "Creates", "site", "to", "site", "vpn", "local", "gateway" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L695-L727
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewDeleteRemoteAccessVpnParams
func (s *VPNService) NewDeleteRemoteAccessVpnParams(publicipid string) *DeleteRemoteAccessVpnParams { p := &DeleteRemoteAccessVpnParams{} p.p = make(map[string]interface{}) p.p["publicipid"] = publicipid return p }
go
func (s *VPNService) NewDeleteRemoteAccessVpnParams(publicipid string) *DeleteRemoteAccessVpnParams { p := &DeleteRemoteAccessVpnParams{} p.p = make(map[string]interface{}) p.p["publicipid"] = publicipid return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewDeleteRemoteAccessVpnParams", "(", "publicipid", "string", ")", "*", "DeleteRemoteAccessVpnParams", "{", "p", ":=", "&", "DeleteRemoteAccessVpnParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "publicipid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteRemoteAccessVpnParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteRemoteAccessVpnParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L768-L773
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewDeleteVpnConnectionParams
func (s *VPNService) NewDeleteVpnConnectionParams(id string) *DeleteVpnConnectionParams { p := &DeleteVpnConnectionParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPNService) NewDeleteVpnConnectionParams(id string) *DeleteVpnConnectionParams { p := &DeleteVpnConnectionParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewDeleteVpnConnectionParams", "(", "id", "string", ")", "*", "DeleteVpnConnectionParams", "{", "p", ":=", "&", "DeleteVpnConnectionParams", "{", "}", "\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 DeleteVpnConnectionParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteVpnConnectionParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L836-L841
train
xanzy/go-cloudstack
cloudstack/VPNService.go
DeleteVpnConnection
func (s *VPNService) DeleteVpnConnection(p *DeleteVpnConnectionParams) (*DeleteVpnConnectionResponse, error) { resp, err := s.cs.newRequest("deleteVpnConnection", p.toURLValues()) if err != nil { return nil, err } var r DeleteVpnConnectionResponse 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 *VPNService) DeleteVpnConnection(p *DeleteVpnConnectionParams) (*DeleteVpnConnectionResponse, error) { resp, err := s.cs.newRequest("deleteVpnConnection", p.toURLValues()) if err != nil { return nil, err } var r DeleteVpnConnectionResponse 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", "*", "VPNService", ")", "DeleteVpnConnection", "(", "p", "*", "DeleteVpnConnectionParams", ")", "(", "*", "DeleteVpnConnectionResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteVpnConnectionResponse", "\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 site to site vpn connection
[ "Delete", "site", "to", "site", "vpn", "connection" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L844-L871
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewDeleteVpnCustomerGatewayParams
func (s *VPNService) NewDeleteVpnCustomerGatewayParams(id string) *DeleteVpnCustomerGatewayParams { p := &DeleteVpnCustomerGatewayParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPNService) NewDeleteVpnCustomerGatewayParams(id string) *DeleteVpnCustomerGatewayParams { p := &DeleteVpnCustomerGatewayParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewDeleteVpnCustomerGatewayParams", "(", "id", "string", ")", "*", "DeleteVpnCustomerGatewayParams", "{", "p", ":=", "&", "DeleteVpnCustomerGatewayParams", "{", "}", "\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 DeleteVpnCustomerGatewayParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteVpnCustomerGatewayParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L904-L909
train
xanzy/go-cloudstack
cloudstack/VPNService.go
DeleteVpnCustomerGateway
func (s *VPNService) DeleteVpnCustomerGateway(p *DeleteVpnCustomerGatewayParams) (*DeleteVpnCustomerGatewayResponse, error) { resp, err := s.cs.newRequest("deleteVpnCustomerGateway", p.toURLValues()) if err != nil { return nil, err } var r DeleteVpnCustomerGatewayResponse 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 *VPNService) DeleteVpnCustomerGateway(p *DeleteVpnCustomerGatewayParams) (*DeleteVpnCustomerGatewayResponse, error) { resp, err := s.cs.newRequest("deleteVpnCustomerGateway", p.toURLValues()) if err != nil { return nil, err } var r DeleteVpnCustomerGatewayResponse 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", "*", "VPNService", ")", "DeleteVpnCustomerGateway", "(", "p", "*", "DeleteVpnCustomerGatewayParams", ")", "(", "*", "DeleteVpnCustomerGatewayResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteVpnCustomerGatewayResponse", "\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 site to site vpn customer gateway
[ "Delete", "site", "to", "site", "vpn", "customer", "gateway" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L912-L939
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewDeleteVpnGatewayParams
func (s *VPNService) NewDeleteVpnGatewayParams(id string) *DeleteVpnGatewayParams { p := &DeleteVpnGatewayParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPNService) NewDeleteVpnGatewayParams(id string) *DeleteVpnGatewayParams { p := &DeleteVpnGatewayParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewDeleteVpnGatewayParams", "(", "id", "string", ")", "*", "DeleteVpnGatewayParams", "{", "p", ":=", "&", "DeleteVpnGatewayParams", "{", "}", "\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 DeleteVpnGatewayParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteVpnGatewayParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L972-L977
train
xanzy/go-cloudstack
cloudstack/VPNService.go
DeleteVpnGateway
func (s *VPNService) DeleteVpnGateway(p *DeleteVpnGatewayParams) (*DeleteVpnGatewayResponse, error) { resp, err := s.cs.newRequest("deleteVpnGateway", p.toURLValues()) if err != nil { return nil, err } var r DeleteVpnGatewayResponse 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 *VPNService) DeleteVpnGateway(p *DeleteVpnGatewayParams) (*DeleteVpnGatewayResponse, error) { resp, err := s.cs.newRequest("deleteVpnGateway", p.toURLValues()) if err != nil { return nil, err } var r DeleteVpnGatewayResponse 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", "*", "VPNService", ")", "DeleteVpnGateway", "(", "p", "*", "DeleteVpnGatewayParams", ")", "(", "*", "DeleteVpnGatewayResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteVpnGatewayResponse", "\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 site to site vpn gateway
[ "Delete", "site", "to", "site", "vpn", "gateway" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L980-L1007
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewListRemoteAccessVpnsParams
func (s *VPNService) NewListRemoteAccessVpnsParams() *ListRemoteAccessVpnsParams { p := &ListRemoteAccessVpnsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VPNService) NewListRemoteAccessVpnsParams() *ListRemoteAccessVpnsParams { p := &ListRemoteAccessVpnsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewListRemoteAccessVpnsParams", "(", ")", "*", "ListRemoteAccessVpnsParams", "{", "p", ":=", "&", "ListRemoteAccessVpnsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListRemoteAccessVpnsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListRemoteAccessVpnsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L1166-L1170
train
xanzy/go-cloudstack
cloudstack/VPNService.go
ListRemoteAccessVpns
func (s *VPNService) ListRemoteAccessVpns(p *ListRemoteAccessVpnsParams) (*ListRemoteAccessVpnsResponse, error) { resp, err := s.cs.newRequest("listRemoteAccessVpns", p.toURLValues()) if err != nil { return nil, err } var r ListRemoteAccessVpnsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VPNService) ListRemoteAccessVpns(p *ListRemoteAccessVpnsParams) (*ListRemoteAccessVpnsResponse, error) { resp, err := s.cs.newRequest("listRemoteAccessVpns", p.toURLValues()) if err != nil { return nil, err } var r ListRemoteAccessVpnsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VPNService", ")", "ListRemoteAccessVpns", "(", "p", "*", "ListRemoteAccessVpnsParams", ")", "(", "*", "ListRemoteAccessVpnsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListRemoteAccessVpnsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists remote access vpns
[ "Lists", "remote", "access", "vpns" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L1206-L1218
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewListVpnConnectionsParams
func (s *VPNService) NewListVpnConnectionsParams() *ListVpnConnectionsParams { p := &ListVpnConnectionsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VPNService) NewListVpnConnectionsParams() *ListVpnConnectionsParams { p := &ListVpnConnectionsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewListVpnConnectionsParams", "(", ")", "*", "ListVpnConnectionsParams", "{", "p", ":=", "&", "ListVpnConnectionsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListVpnConnectionsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListVpnConnectionsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L1380-L1384
train
xanzy/go-cloudstack
cloudstack/VPNService.go
ListVpnConnections
func (s *VPNService) ListVpnConnections(p *ListVpnConnectionsParams) (*ListVpnConnectionsResponse, error) { resp, err := s.cs.newRequest("listVpnConnections", p.toURLValues()) if err != nil { return nil, err } var r ListVpnConnectionsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VPNService) ListVpnConnections(p *ListVpnConnectionsParams) (*ListVpnConnectionsResponse, error) { resp, err := s.cs.newRequest("listVpnConnections", p.toURLValues()) if err != nil { return nil, err } var r ListVpnConnectionsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VPNService", ")", "ListVpnConnections", "(", "p", "*", "ListVpnConnectionsParams", ")", "(", "*", "ListVpnConnectionsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListVpnConnectionsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists site to site vpn connection gateways
[ "Lists", "site", "to", "site", "vpn", "connection", "gateways" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L1420-L1432
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewListVpnCustomerGatewaysParams
func (s *VPNService) NewListVpnCustomerGatewaysParams() *ListVpnCustomerGatewaysParams { p := &ListVpnCustomerGatewaysParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VPNService) NewListVpnCustomerGatewaysParams() *ListVpnCustomerGatewaysParams { p := &ListVpnCustomerGatewaysParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewListVpnCustomerGatewaysParams", "(", ")", "*", "ListVpnCustomerGatewaysParams", "{", "p", ":=", "&", "ListVpnCustomerGatewaysParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListVpnCustomerGatewaysParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListVpnCustomerGatewaysParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L1582-L1586
train
xanzy/go-cloudstack
cloudstack/VPNService.go
ListVpnCustomerGateways
func (s *VPNService) ListVpnCustomerGateways(p *ListVpnCustomerGatewaysParams) (*ListVpnCustomerGatewaysResponse, error) { resp, err := s.cs.newRequest("listVpnCustomerGateways", p.toURLValues()) if err != nil { return nil, err } var r ListVpnCustomerGatewaysResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VPNService) ListVpnCustomerGateways(p *ListVpnCustomerGatewaysParams) (*ListVpnCustomerGatewaysResponse, error) { resp, err := s.cs.newRequest("listVpnCustomerGateways", p.toURLValues()) if err != nil { return nil, err } var r ListVpnCustomerGatewaysResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VPNService", ")", "ListVpnCustomerGateways", "(", "p", "*", "ListVpnCustomerGatewaysParams", ")", "(", "*", "ListVpnCustomerGatewaysResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListVpnCustomerGatewaysResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists site to site vpn customer gateways
[ "Lists", "site", "to", "site", "vpn", "customer", "gateways" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L1672-L1684
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewListVpnGatewaysParams
func (s *VPNService) NewListVpnGatewaysParams() *ListVpnGatewaysParams { p := &ListVpnGatewaysParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VPNService) NewListVpnGatewaysParams() *ListVpnGatewaysParams { p := &ListVpnGatewaysParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewListVpnGatewaysParams", "(", ")", "*", "ListVpnGatewaysParams", "{", "p", ":=", "&", "ListVpnGatewaysParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListVpnGatewaysParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListVpnGatewaysParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L1852-L1856
train
xanzy/go-cloudstack
cloudstack/VPNService.go
ListVpnGateways
func (s *VPNService) ListVpnGateways(p *ListVpnGatewaysParams) (*ListVpnGatewaysResponse, error) { resp, err := s.cs.newRequest("listVpnGateways", p.toURLValues()) if err != nil { return nil, err } var r ListVpnGatewaysResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VPNService) ListVpnGateways(p *ListVpnGatewaysParams) (*ListVpnGatewaysResponse, error) { resp, err := s.cs.newRequest("listVpnGateways", p.toURLValues()) if err != nil { return nil, err } var r ListVpnGatewaysResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VPNService", ")", "ListVpnGateways", "(", "p", "*", "ListVpnGatewaysParams", ")", "(", "*", "ListVpnGatewaysResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListVpnGatewaysResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists site 2 site vpn gateways
[ "Lists", "site", "2", "site", "vpn", "gateways" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L1892-L1904
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewListVpnUsersParams
func (s *VPNService) NewListVpnUsersParams() *ListVpnUsersParams { p := &ListVpnUsersParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VPNService) NewListVpnUsersParams() *ListVpnUsersParams { p := &ListVpnUsersParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewListVpnUsersParams", "(", ")", "*", "ListVpnUsersParams", "{", "p", ":=", "&", "ListVpnUsersParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListVpnUsersParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListVpnUsersParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2052-L2056
train
xanzy/go-cloudstack
cloudstack/VPNService.go
ListVpnUsers
func (s *VPNService) ListVpnUsers(p *ListVpnUsersParams) (*ListVpnUsersResponse, error) { resp, err := s.cs.newRequest("listVpnUsers", p.toURLValues()) if err != nil { return nil, err } var r ListVpnUsersResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VPNService) ListVpnUsers(p *ListVpnUsersParams) (*ListVpnUsersResponse, error) { resp, err := s.cs.newRequest("listVpnUsers", p.toURLValues()) if err != nil { return nil, err } var r ListVpnUsersResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VPNService", ")", "ListVpnUsers", "(", "p", "*", "ListVpnUsersParams", ")", "(", "*", "ListVpnUsersResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListVpnUsersResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists vpn users
[ "Lists", "vpn", "users" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2092-L2104
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewRemoveVpnUserParams
func (s *VPNService) NewRemoveVpnUserParams(username string) *RemoveVpnUserParams { p := &RemoveVpnUserParams{} p.p = make(map[string]interface{}) p.p["username"] = username return p }
go
func (s *VPNService) NewRemoveVpnUserParams(username string) *RemoveVpnUserParams { p := &RemoveVpnUserParams{} p.p = make(map[string]interface{}) p.p["username"] = username return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewRemoveVpnUserParams", "(", "username", "string", ")", "*", "RemoveVpnUserParams", "{", "p", ":=", "&", "RemoveVpnUserParams", "{", "}", "\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 RemoveVpnUserParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "RemoveVpnUserParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2180-L2185
train
xanzy/go-cloudstack
cloudstack/VPNService.go
RemoveVpnUser
func (s *VPNService) RemoveVpnUser(p *RemoveVpnUserParams) (*RemoveVpnUserResponse, error) { resp, err := s.cs.newRequest("removeVpnUser", p.toURLValues()) if err != nil { return nil, err } var r RemoveVpnUserResponse 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 *VPNService) RemoveVpnUser(p *RemoveVpnUserParams) (*RemoveVpnUserResponse, error) { resp, err := s.cs.newRequest("removeVpnUser", p.toURLValues()) if err != nil { return nil, err } var r RemoveVpnUserResponse 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", "*", "VPNService", ")", "RemoveVpnUser", "(", "p", "*", "RemoveVpnUserParams", ")", "(", "*", "RemoveVpnUserResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "RemoveVpnUserResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Removes vpn user
[ "Removes", "vpn", "user" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2188-L2215
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewResetVpnConnectionParams
func (s *VPNService) NewResetVpnConnectionParams(id string) *ResetVpnConnectionParams { p := &ResetVpnConnectionParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPNService) NewResetVpnConnectionParams(id string) *ResetVpnConnectionParams { p := &ResetVpnConnectionParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewResetVpnConnectionParams", "(", "id", "string", ")", "*", "ResetVpnConnectionParams", "{", "p", ":=", "&", "ResetVpnConnectionParams", "{", "}", "\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 ResetVpnConnectionParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ResetVpnConnectionParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2270-L2275
train
xanzy/go-cloudstack
cloudstack/VPNService.go
ResetVpnConnection
func (s *VPNService) ResetVpnConnection(p *ResetVpnConnectionParams) (*ResetVpnConnectionResponse, error) { resp, err := s.cs.newRequest("resetVpnConnection", p.toURLValues()) if err != nil { return nil, err } var r ResetVpnConnectionResponse 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 *VPNService) ResetVpnConnection(p *ResetVpnConnectionParams) (*ResetVpnConnectionResponse, error) { resp, err := s.cs.newRequest("resetVpnConnection", p.toURLValues()) if err != nil { return nil, err } var r ResetVpnConnectionResponse 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", "*", "VPNService", ")", "ResetVpnConnection", "(", "p", "*", "ResetVpnConnectionParams", ")", "(", "*", "ResetVpnConnectionResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ResetVpnConnectionResponse", "\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", "}" ]
// Reset site to site vpn connection
[ "Reset", "site", "to", "site", "vpn", "connection" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2278-L2310
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewUpdateRemoteAccessVpnParams
func (s *VPNService) NewUpdateRemoteAccessVpnParams(id string) *UpdateRemoteAccessVpnParams { p := &UpdateRemoteAccessVpnParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPNService) NewUpdateRemoteAccessVpnParams(id string) *UpdateRemoteAccessVpnParams { p := &UpdateRemoteAccessVpnParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewUpdateRemoteAccessVpnParams", "(", "id", "string", ")", "*", "UpdateRemoteAccessVpnParams", "{", "p", ":=", "&", "UpdateRemoteAccessVpnParams", "{", "}", "\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 UpdateRemoteAccessVpnParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateRemoteAccessVpnParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2387-L2392
train
xanzy/go-cloudstack
cloudstack/VPNService.go
UpdateRemoteAccessVpn
func (s *VPNService) UpdateRemoteAccessVpn(p *UpdateRemoteAccessVpnParams) (*UpdateRemoteAccessVpnResponse, error) { resp, err := s.cs.newRequest("updateRemoteAccessVpn", p.toURLValues()) if err != nil { return nil, err } var r UpdateRemoteAccessVpnResponse 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 *VPNService) UpdateRemoteAccessVpn(p *UpdateRemoteAccessVpnParams) (*UpdateRemoteAccessVpnResponse, error) { resp, err := s.cs.newRequest("updateRemoteAccessVpn", p.toURLValues()) if err != nil { return nil, err } var r UpdateRemoteAccessVpnResponse 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", "*", "VPNService", ")", "UpdateRemoteAccessVpn", "(", "p", "*", "UpdateRemoteAccessVpnParams", ")", "(", "*", "UpdateRemoteAccessVpnResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateRemoteAccessVpnResponse", "\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 remote access vpn
[ "Updates", "remote", "access", "vpn" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2395-L2427
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewUpdateVpnConnectionParams
func (s *VPNService) NewUpdateVpnConnectionParams(id string) *UpdateVpnConnectionParams { p := &UpdateVpnConnectionParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPNService) NewUpdateVpnConnectionParams(id string) *UpdateVpnConnectionParams { p := &UpdateVpnConnectionParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewUpdateVpnConnectionParams", "(", "id", "string", ")", "*", "UpdateVpnConnectionParams", "{", "p", ":=", "&", "UpdateVpnConnectionParams", "{", "}", "\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 UpdateVpnConnectionParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateVpnConnectionParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2493-L2498
train
xanzy/go-cloudstack
cloudstack/VPNService.go
UpdateVpnConnection
func (s *VPNService) UpdateVpnConnection(p *UpdateVpnConnectionParams) (*UpdateVpnConnectionResponse, error) { resp, err := s.cs.newRequest("updateVpnConnection", p.toURLValues()) if err != nil { return nil, err } var r UpdateVpnConnectionResponse 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 *VPNService) UpdateVpnConnection(p *UpdateVpnConnectionParams) (*UpdateVpnConnectionResponse, error) { resp, err := s.cs.newRequest("updateVpnConnection", p.toURLValues()) if err != nil { return nil, err } var r UpdateVpnConnectionResponse 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", "*", "VPNService", ")", "UpdateVpnConnection", "(", "p", "*", "UpdateVpnConnectionParams", ")", "(", "*", "UpdateVpnConnectionResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateVpnConnectionResponse", "\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 site to site vpn connection
[ "Updates", "site", "to", "site", "vpn", "connection" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2501-L2533
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewUpdateVpnCustomerGatewayParams
func (s *VPNService) NewUpdateVpnCustomerGatewayParams(cidrlist string, esppolicy string, gateway string, id string, ikepolicy string, ipsecpsk string) *UpdateVpnCustomerGatewayParams { p := &UpdateVpnCustomerGatewayParams{} p.p = make(map[string]interface{}) p.p["cidrlist"] = cidrlist p.p["esppolicy"] = esppolicy p.p["gateway"] = gateway p.p["id"] = id p.p["ikepolicy"] = ikepolicy p.p["ipsecpsk"] = ipsecpsk return p }
go
func (s *VPNService) NewUpdateVpnCustomerGatewayParams(cidrlist string, esppolicy string, gateway string, id string, ikepolicy string, ipsecpsk string) *UpdateVpnCustomerGatewayParams { p := &UpdateVpnCustomerGatewayParams{} p.p = make(map[string]interface{}) p.p["cidrlist"] = cidrlist p.p["esppolicy"] = esppolicy p.p["gateway"] = gateway p.p["id"] = id p.p["ikepolicy"] = ikepolicy p.p["ipsecpsk"] = ipsecpsk return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewUpdateVpnCustomerGatewayParams", "(", "cidrlist", "string", ",", "esppolicy", "string", ",", "gateway", "string", ",", "id", "string", ",", "ikepolicy", "string", ",", "ipsecpsk", "string", ")", "*", "UpdateVpnCustomerGatewayParams", "{", "p", ":=", "&", "UpdateVpnCustomerGatewayParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "cidrlist", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "esppolicy", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "gateway", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "ikepolicy", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "ipsecpsk", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UpdateVpnCustomerGatewayParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateVpnCustomerGatewayParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2723-L2733
train
xanzy/go-cloudstack
cloudstack/VPNService.go
UpdateVpnCustomerGateway
func (s *VPNService) UpdateVpnCustomerGateway(p *UpdateVpnCustomerGatewayParams) (*UpdateVpnCustomerGatewayResponse, error) { resp, err := s.cs.newRequest("updateVpnCustomerGateway", p.toURLValues()) if err != nil { return nil, err } var r UpdateVpnCustomerGatewayResponse 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 *VPNService) UpdateVpnCustomerGateway(p *UpdateVpnCustomerGatewayParams) (*UpdateVpnCustomerGatewayResponse, error) { resp, err := s.cs.newRequest("updateVpnCustomerGateway", p.toURLValues()) if err != nil { return nil, err } var r UpdateVpnCustomerGatewayResponse 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", "*", "VPNService", ")", "UpdateVpnCustomerGateway", "(", "p", "*", "UpdateVpnCustomerGatewayParams", ")", "(", "*", "UpdateVpnCustomerGatewayResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateVpnCustomerGatewayResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Update site to site vpn customer gateway
[ "Update", "site", "to", "site", "vpn", "customer", "gateway" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2736-L2768
train
xanzy/go-cloudstack
cloudstack/VPNService.go
NewUpdateVpnGatewayParams
func (s *VPNService) NewUpdateVpnGatewayParams(id string) *UpdateVpnGatewayParams { p := &UpdateVpnGatewayParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VPNService) NewUpdateVpnGatewayParams(id string) *UpdateVpnGatewayParams { p := &UpdateVpnGatewayParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VPNService", ")", "NewUpdateVpnGatewayParams", "(", "id", "string", ")", "*", "UpdateVpnGatewayParams", "{", "p", ":=", "&", "UpdateVpnGatewayParams", "{", "}", "\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 UpdateVpnGatewayParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateVpnGatewayParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2840-L2845
train
xanzy/go-cloudstack
cloudstack/VPNService.go
UpdateVpnGateway
func (s *VPNService) UpdateVpnGateway(p *UpdateVpnGatewayParams) (*UpdateVpnGatewayResponse, error) { resp, err := s.cs.newRequest("updateVpnGateway", p.toURLValues()) if err != nil { return nil, err } var r UpdateVpnGatewayResponse 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 *VPNService) UpdateVpnGateway(p *UpdateVpnGatewayParams) (*UpdateVpnGatewayResponse, error) { resp, err := s.cs.newRequest("updateVpnGateway", p.toURLValues()) if err != nil { return nil, err } var r UpdateVpnGatewayResponse 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", "*", "VPNService", ")", "UpdateVpnGateway", "(", "p", "*", "UpdateVpnGatewayParams", ")", "(", "*", "UpdateVpnGatewayResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateVpnGatewayResponse", "\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 site to site vpn local gateway
[ "Updates", "site", "to", "site", "vpn", "local", "gateway" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VPNService.go#L2848-L2880
train
xanzy/go-cloudstack
cloudstack/PodService.go
NewCreatePodParams
func (s *PodService) NewCreatePodParams(gateway string, name string, netmask string, startip string, zoneid string) *CreatePodParams { p := &CreatePodParams{} p.p = make(map[string]interface{}) p.p["gateway"] = gateway p.p["name"] = name p.p["netmask"] = netmask p.p["startip"] = startip p.p["zoneid"] = zoneid return p }
go
func (s *PodService) NewCreatePodParams(gateway string, name string, netmask string, startip string, zoneid string) *CreatePodParams { p := &CreatePodParams{} p.p = make(map[string]interface{}) p.p["gateway"] = gateway p.p["name"] = name p.p["netmask"] = netmask p.p["startip"] = startip p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "PodService", ")", "NewCreatePodParams", "(", "gateway", "string", ",", "name", "string", ",", "netmask", "string", ",", "startip", "string", ",", "zoneid", "string", ")", "*", "CreatePodParams", "{", "p", ":=", "&", "CreatePodParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "gateway", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "netmask", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "startip", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreatePodParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreatePodParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/PodService.go#L118-L127
train
xanzy/go-cloudstack
cloudstack/PodService.go
NewDedicatePodParams
func (s *PodService) NewDedicatePodParams(domainid string, podid string) *DedicatePodParams { p := &DedicatePodParams{} p.p = make(map[string]interface{}) p.p["domainid"] = domainid p.p["podid"] = podid return p }
go
func (s *PodService) NewDedicatePodParams(domainid string, podid string) *DedicatePodParams { p := &DedicatePodParams{} p.p = make(map[string]interface{}) p.p["domainid"] = domainid p.p["podid"] = podid return p }
[ "func", "(", "s", "*", "PodService", ")", "NewDedicatePodParams", "(", "domainid", "string", ",", "podid", "string", ")", "*", "DedicatePodParams", "{", "p", ":=", "&", "DedicatePodParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "domainid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "podid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DedicatePodParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DedicatePodParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/PodService.go#L221-L227
train
xanzy/go-cloudstack
cloudstack/PodService.go
NewDeletePodParams
func (s *PodService) NewDeletePodParams(id string) *DeletePodParams { p := &DeletePodParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *PodService) NewDeletePodParams(id string) *DeletePodParams { p := &DeletePodParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "PodService", ")", "NewDeletePodParams", "(", "id", "string", ")", "*", "DeletePodParams", "{", "p", ":=", "&", "DeletePodParams", "{", "}", "\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 DeletePodParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeletePodParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/PodService.go#L299-L304
train
xanzy/go-cloudstack
cloudstack/PodService.go
NewListDedicatedPodsParams
func (s *PodService) NewListDedicatedPodsParams() *ListDedicatedPodsParams { p := &ListDedicatedPodsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *PodService) NewListDedicatedPodsParams() *ListDedicatedPodsParams { p := &ListDedicatedPodsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "PodService", ")", "NewListDedicatedPodsParams", "(", ")", "*", "ListDedicatedPodsParams", "{", "p", ":=", "&", "ListDedicatedPodsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListDedicatedPodsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListDedicatedPodsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/PodService.go#L438-L442
train
xanzy/go-cloudstack
cloudstack/PodService.go
NewListPodsParams
func (s *PodService) NewListPodsParams() *ListPodsParams { p := &ListPodsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *PodService) NewListPodsParams() *ListPodsParams { p := &ListPodsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "PodService", ")", "NewListPodsParams", "(", ")", "*", "ListPodsParams", "{", "p", ":=", "&", "ListPodsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListPodsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListPodsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/PodService.go#L578-L582
train
xanzy/go-cloudstack
cloudstack/PodService.go
NewReleaseDedicatedPodParams
func (s *PodService) NewReleaseDedicatedPodParams(podid string) *ReleaseDedicatedPodParams { p := &ReleaseDedicatedPodParams{} p.p = make(map[string]interface{}) p.p["podid"] = podid return p }
go
func (s *PodService) NewReleaseDedicatedPodParams(podid string) *ReleaseDedicatedPodParams { p := &ReleaseDedicatedPodParams{} p.p = make(map[string]interface{}) p.p["podid"] = podid return p }
[ "func", "(", "s", "*", "PodService", ")", "NewReleaseDedicatedPodParams", "(", "podid", "string", ")", "*", "ReleaseDedicatedPodParams", "{", "p", ":=", "&", "ReleaseDedicatedPodParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "podid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ReleaseDedicatedPodParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ReleaseDedicatedPodParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/PodService.go#L742-L747
train
xanzy/go-cloudstack
cloudstack/PodService.go
NewUpdatePodParams
func (s *PodService) NewUpdatePodParams(id string) *UpdatePodParams { p := &UpdatePodParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *PodService) NewUpdatePodParams(id string) *UpdatePodParams { p := &UpdatePodParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "PodService", ")", "NewUpdatePodParams", "(", "id", "string", ")", "*", "UpdatePodParams", "{", "p", ":=", "&", "UpdatePodParams", "{", "}", "\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 UpdatePodParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdatePodParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/PodService.go#L876-L881
train
xanzy/go-cloudstack
cloudstack/QuotaService.go
NewQuotaIsEnabledParams
func (s *QuotaService) NewQuotaIsEnabledParams() *QuotaIsEnabledParams { p := &QuotaIsEnabledParams{} p.p = make(map[string]interface{}) return p }
go
func (s *QuotaService) NewQuotaIsEnabledParams() *QuotaIsEnabledParams { p := &QuotaIsEnabledParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "QuotaService", ")", "NewQuotaIsEnabledParams", "(", ")", "*", "QuotaIsEnabledParams", "{", "p", ":=", "&", "QuotaIsEnabledParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new QuotaIsEnabledParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "QuotaIsEnabledParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/QuotaService.go#L38-L42
train
xanzy/go-cloudstack
cloudstack/QuotaService.go
QuotaIsEnabled
func (s *QuotaService) QuotaIsEnabled(p *QuotaIsEnabledParams) (*QuotaIsEnabledResponse, error) { resp, err := s.cs.newRequest("quotaIsEnabled", p.toURLValues()) if err != nil { return nil, err } var r QuotaIsEnabledResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *QuotaService) QuotaIsEnabled(p *QuotaIsEnabledParams) (*QuotaIsEnabledResponse, error) { resp, err := s.cs.newRequest("quotaIsEnabled", p.toURLValues()) if err != nil { return nil, err } var r QuotaIsEnabledResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "QuotaService", ")", "QuotaIsEnabled", "(", "p", "*", "QuotaIsEnabledParams", ")", "(", "*", "QuotaIsEnabledResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "QuotaIsEnabledResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Return true if the plugin is enabled
[ "Return", "true", "if", "the", "plugin", "is", "enabled" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/QuotaService.go#L45-L57
train
xanzy/go-cloudstack
cloudstack/AccountService.go
NewAddAccountToProjectParams
func (s *AccountService) NewAddAccountToProjectParams(projectid string) *AddAccountToProjectParams { p := &AddAccountToProjectParams{} p.p = make(map[string]interface{}) p.p["projectid"] = projectid return p }
go
func (s *AccountService) NewAddAccountToProjectParams(projectid string) *AddAccountToProjectParams { p := &AddAccountToProjectParams{} p.p = make(map[string]interface{}) p.p["projectid"] = projectid return p }
[ "func", "(", "s", "*", "AccountService", ")", "NewAddAccountToProjectParams", "(", "projectid", "string", ")", "*", "AddAccountToProjectParams", "{", "p", ":=", "&", "AddAccountToProjectParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "projectid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AddAccountToProjectParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddAccountToProjectParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AccountService.go#L74-L79
train
xanzy/go-cloudstack
cloudstack/AccountService.go
AddAccountToProject
func (s *AccountService) AddAccountToProject(p *AddAccountToProjectParams) (*AddAccountToProjectResponse, error) { resp, err := s.cs.newRequest("addAccountToProject", p.toURLValues()) if err != nil { return nil, err } var r AddAccountToProjectResponse 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 *AccountService) AddAccountToProject(p *AddAccountToProjectParams) (*AddAccountToProjectResponse, error) { resp, err := s.cs.newRequest("addAccountToProject", p.toURLValues()) if err != nil { return nil, err } var r AddAccountToProjectResponse 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", "*", "AccountService", ")", "AddAccountToProject", "(", "p", "*", "AddAccountToProjectParams", ")", "(", "*", "AddAccountToProjectResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "AddAccountToProjectResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Adds account to a project
[ "Adds", "account", "to", "a", "project" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AccountService.go#L82-L109
train
xanzy/go-cloudstack
cloudstack/AccountService.go
NewCreateAccountParams
func (s *AccountService) NewCreateAccountParams(email string, firstname string, lastname string, password string, username string) *CreateAccountParams { p := &CreateAccountParams{} p.p = make(map[string]interface{}) p.p["email"] = email p.p["firstname"] = firstname p.p["lastname"] = lastname p.p["password"] = password p.p["username"] = username return p }
go
func (s *AccountService) NewCreateAccountParams(email string, firstname string, lastname string, password string, username string) *CreateAccountParams { p := &CreateAccountParams{} p.p = make(map[string]interface{}) p.p["email"] = email p.p["firstname"] = firstname p.p["lastname"] = lastname p.p["password"] = password p.p["username"] = username return p }
[ "func", "(", "s", "*", "AccountService", ")", "NewCreateAccountParams", "(", "email", "string", ",", "firstname", "string", ",", "lastname", "string", ",", "password", "string", ",", "username", "string", ")", "*", "CreateAccountParams", "{", "p", ":=", "&", "CreateAccountParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "email", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "firstname", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "lastname", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "password", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "username", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateAccountParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateAccountParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AccountService.go#L291-L300
train
xanzy/go-cloudstack
cloudstack/AccountService.go
NewDeleteAccountParams
func (s *AccountService) NewDeleteAccountParams(id string) *DeleteAccountParams { p := &DeleteAccountParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AccountService) NewDeleteAccountParams(id string) *DeleteAccountParams { p := &DeleteAccountParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AccountService", ")", "NewDeleteAccountParams", "(", "id", "string", ")", "*", "DeleteAccountParams", "{", "p", ":=", "&", "DeleteAccountParams", "{", "}", "\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 DeleteAccountParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteAccountParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AccountService.go#L429-L434
train
xanzy/go-cloudstack
cloudstack/AccountService.go
NewDeleteAccountFromProjectParams
func (s *AccountService) NewDeleteAccountFromProjectParams(account string, projectid string) *DeleteAccountFromProjectParams { p := &DeleteAccountFromProjectParams{} p.p = make(map[string]interface{}) p.p["account"] = account p.p["projectid"] = projectid return p }
go
func (s *AccountService) NewDeleteAccountFromProjectParams(account string, projectid string) *DeleteAccountFromProjectParams { p := &DeleteAccountFromProjectParams{} p.p = make(map[string]interface{}) p.p["account"] = account p.p["projectid"] = projectid return p }
[ "func", "(", "s", "*", "AccountService", ")", "NewDeleteAccountFromProjectParams", "(", "account", "string", ",", "projectid", "string", ")", "*", "DeleteAccountFromProjectParams", "{", "p", ":=", "&", "DeleteAccountFromProjectParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "account", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "projectid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteAccountFromProjectParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteAccountFromProjectParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AccountService.go#L508-L514
train
xanzy/go-cloudstack
cloudstack/AccountService.go
NewDisableAccountParams
func (s *AccountService) NewDisableAccountParams(lock bool) *DisableAccountParams { p := &DisableAccountParams{} p.p = make(map[string]interface{}) p.p["lock"] = lock return p }
go
func (s *AccountService) NewDisableAccountParams(lock bool) *DisableAccountParams { p := &DisableAccountParams{} p.p = make(map[string]interface{}) p.p["lock"] = lock return p }
[ "func", "(", "s", "*", "AccountService", ")", "NewDisableAccountParams", "(", "lock", "bool", ")", "*", "DisableAccountParams", "{", "p", ":=", "&", "DisableAccountParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "lock", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DisableAccountParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DisableAccountParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AccountService.go#L611-L616
train
xanzy/go-cloudstack
cloudstack/AccountService.go
NewEnableAccountParams
func (s *AccountService) NewEnableAccountParams() *EnableAccountParams { p := &EnableAccountParams{} p.p = make(map[string]interface{}) return p }
go
func (s *AccountService) NewEnableAccountParams() *EnableAccountParams { p := &EnableAccountParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "AccountService", ")", "NewEnableAccountParams", "(", ")", "*", "EnableAccountParams", "{", "p", ":=", "&", "EnableAccountParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new EnableAccountParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "EnableAccountParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AccountService.go#L784-L788
train
xanzy/go-cloudstack
cloudstack/AccountService.go
NewGetSolidFireAccountIdParams
func (s *AccountService) NewGetSolidFireAccountIdParams(accountid string, storageid string) *GetSolidFireAccountIdParams { p := &GetSolidFireAccountIdParams{} p.p = make(map[string]interface{}) p.p["accountid"] = accountid p.p["storageid"] = storageid return p }
go
func (s *AccountService) NewGetSolidFireAccountIdParams(accountid string, storageid string) *GetSolidFireAccountIdParams { p := &GetSolidFireAccountIdParams{} p.p = make(map[string]interface{}) p.p["accountid"] = accountid p.p["storageid"] = storageid return p }
[ "func", "(", "s", "*", "AccountService", ")", "NewGetSolidFireAccountIdParams", "(", "accountid", "string", ",", "storageid", "string", ")", "*", "GetSolidFireAccountIdParams", "{", "p", ":=", "&", "GetSolidFireAccountIdParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "accountid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "storageid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new GetSolidFireAccountIdParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "GetSolidFireAccountIdParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AccountService.go#L924-L930
train