id
int32 0
167k
| repo
stringlengths 5
54
| path
stringlengths 4
155
| func_name
stringlengths 1
118
| original_string
stringlengths 52
85.5k
| language
stringclasses 1
value | code
stringlengths 52
85.5k
| code_tokens
listlengths 21
1.41k
| docstring
stringlengths 6
2.61k
| docstring_tokens
listlengths 3
215
| sha
stringlengths 40
40
| url
stringlengths 85
252
|
---|---|---|---|---|---|---|---|---|---|---|---|
145,200 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
NewAddTrafficTypeParams
|
func (s *UsageService) NewAddTrafficTypeParams(physicalnetworkid string, traffictype string) *AddTrafficTypeParams {
p := &AddTrafficTypeParams{}
p.p = make(map[string]interface{})
p.p["physicalnetworkid"] = physicalnetworkid
p.p["traffictype"] = traffictype
return p
}
|
go
|
func (s *UsageService) NewAddTrafficTypeParams(physicalnetworkid string, traffictype string) *AddTrafficTypeParams {
p := &AddTrafficTypeParams{}
p.p = make(map[string]interface{})
p.p["physicalnetworkid"] = physicalnetworkid
p.p["traffictype"] = traffictype
return p
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"NewAddTrafficTypeParams",
"(",
"physicalnetworkid",
"string",
",",
"traffictype",
"string",
")",
"*",
"AddTrafficTypeParams",
"{",
"p",
":=",
"&",
"AddTrafficTypeParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"physicalnetworkid",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"traffictype",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new AddTrafficTypeParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"AddTrafficTypeParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L228-L234
|
145,201 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
AddTrafficType
|
func (s *UsageService) AddTrafficType(p *AddTrafficTypeParams) (*AddTrafficTypeResponse, error) {
resp, err := s.cs.newRequest("addTrafficType", p.toURLValues())
if err != nil {
return nil, err
}
var r AddTrafficTypeResponse
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 *UsageService) AddTrafficType(p *AddTrafficTypeParams) (*AddTrafficTypeResponse, error) {
resp, err := s.cs.newRequest("addTrafficType", p.toURLValues())
if err != nil {
return nil, err
}
var r AddTrafficTypeResponse
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",
"*",
"UsageService",
")",
"AddTrafficType",
"(",
"p",
"*",
"AddTrafficTypeParams",
")",
"(",
"*",
"AddTrafficTypeResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"AddTrafficTypeResponse",
"\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 traffic type to a physical network
|
[
"Adds",
"traffic",
"type",
"to",
"a",
"physical",
"network"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L237-L269
|
145,202 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
NewDeleteTrafficMonitorParams
|
func (s *UsageService) NewDeleteTrafficMonitorParams(id string) *DeleteTrafficMonitorParams {
p := &DeleteTrafficMonitorParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *UsageService) NewDeleteTrafficMonitorParams(id string) *DeleteTrafficMonitorParams {
p := &DeleteTrafficMonitorParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"NewDeleteTrafficMonitorParams",
"(",
"id",
"string",
")",
"*",
"DeleteTrafficMonitorParams",
"{",
"p",
":=",
"&",
"DeleteTrafficMonitorParams",
"{",
"}",
"\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 DeleteTrafficMonitorParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"DeleteTrafficMonitorParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L308-L313
|
145,203 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
DeleteTrafficMonitor
|
func (s *UsageService) DeleteTrafficMonitor(p *DeleteTrafficMonitorParams) (*DeleteTrafficMonitorResponse, error) {
resp, err := s.cs.newRequest("deleteTrafficMonitor", p.toURLValues())
if err != nil {
return nil, err
}
var r DeleteTrafficMonitorResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *UsageService) DeleteTrafficMonitor(p *DeleteTrafficMonitorParams) (*DeleteTrafficMonitorResponse, error) {
resp, err := s.cs.newRequest("deleteTrafficMonitor", p.toURLValues())
if err != nil {
return nil, err
}
var r DeleteTrafficMonitorResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"DeleteTrafficMonitor",
"(",
"p",
"*",
"DeleteTrafficMonitorParams",
")",
"(",
"*",
"DeleteTrafficMonitorResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"DeleteTrafficMonitorResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// Deletes an traffic monitor host.
|
[
"Deletes",
"an",
"traffic",
"monitor",
"host",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L316-L328
|
145,204 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
NewDeleteTrafficTypeParams
|
func (s *UsageService) NewDeleteTrafficTypeParams(id string) *DeleteTrafficTypeParams {
p := &DeleteTrafficTypeParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *UsageService) NewDeleteTrafficTypeParams(id string) *DeleteTrafficTypeParams {
p := &DeleteTrafficTypeParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"NewDeleteTrafficTypeParams",
"(",
"id",
"string",
")",
"*",
"DeleteTrafficTypeParams",
"{",
"p",
":=",
"&",
"DeleteTrafficTypeParams",
"{",
"}",
"\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 DeleteTrafficTypeParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"DeleteTrafficTypeParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L379-L384
|
145,205 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
DeleteTrafficType
|
func (s *UsageService) DeleteTrafficType(p *DeleteTrafficTypeParams) (*DeleteTrafficTypeResponse, error) {
resp, err := s.cs.newRequest("deleteTrafficType", p.toURLValues())
if err != nil {
return nil, err
}
var r DeleteTrafficTypeResponse
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 *UsageService) DeleteTrafficType(p *DeleteTrafficTypeParams) (*DeleteTrafficTypeResponse, error) {
resp, err := s.cs.newRequest("deleteTrafficType", p.toURLValues())
if err != nil {
return nil, err
}
var r DeleteTrafficTypeResponse
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",
"*",
"UsageService",
")",
"DeleteTrafficType",
"(",
"p",
"*",
"DeleteTrafficTypeParams",
")",
"(",
"*",
"DeleteTrafficTypeResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"DeleteTrafficTypeResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"// If we have a async client, we need to wait for the async result",
"if",
"s",
".",
"cs",
".",
"async",
"{",
"b",
",",
"err",
":=",
"s",
".",
"cs",
".",
"GetAsyncJobResult",
"(",
"r",
".",
"JobID",
",",
"s",
".",
"cs",
".",
"timeout",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"if",
"err",
"==",
"AsyncTimeoutErr",
"{",
"return",
"&",
"r",
",",
"err",
"\n",
"}",
"\n",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"b",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// Deletes traffic type of a physical network
|
[
"Deletes",
"traffic",
"type",
"of",
"a",
"physical",
"network"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L387-L414
|
145,206 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
NewGenerateUsageRecordsParams
|
func (s *UsageService) NewGenerateUsageRecordsParams(enddate string, startdate string) *GenerateUsageRecordsParams {
p := &GenerateUsageRecordsParams{}
p.p = make(map[string]interface{})
p.p["enddate"] = enddate
p.p["startdate"] = startdate
return p
}
|
go
|
func (s *UsageService) NewGenerateUsageRecordsParams(enddate string, startdate string) *GenerateUsageRecordsParams {
p := &GenerateUsageRecordsParams{}
p.p = make(map[string]interface{})
p.p["enddate"] = enddate
p.p["startdate"] = startdate
return p
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"NewGenerateUsageRecordsParams",
"(",
"enddate",
"string",
",",
"startdate",
"string",
")",
"*",
"GenerateUsageRecordsParams",
"{",
"p",
":=",
"&",
"GenerateUsageRecordsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"enddate",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"startdate",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new GenerateUsageRecordsParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"GenerateUsageRecordsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L469-L475
|
145,207 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
GenerateUsageRecords
|
func (s *UsageService) GenerateUsageRecords(p *GenerateUsageRecordsParams) (*GenerateUsageRecordsResponse, error) {
resp, err := s.cs.newRequest("generateUsageRecords", p.toURLValues())
if err != nil {
return nil, err
}
var r GenerateUsageRecordsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *UsageService) GenerateUsageRecords(p *GenerateUsageRecordsParams) (*GenerateUsageRecordsResponse, error) {
resp, err := s.cs.newRequest("generateUsageRecords", p.toURLValues())
if err != nil {
return nil, err
}
var r GenerateUsageRecordsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"GenerateUsageRecords",
"(",
"p",
"*",
"GenerateUsageRecordsParams",
")",
"(",
"*",
"GenerateUsageRecordsResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"GenerateUsageRecordsResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// Generates usage records. This will generate records only if there any records to be generated, i.e if the scheduled usage job was not run or failed
|
[
"Generates",
"usage",
"records",
".",
"This",
"will",
"generate",
"records",
"only",
"if",
"there",
"any",
"records",
"to",
"be",
"generated",
"i",
".",
"e",
"if",
"the",
"scheduled",
"usage",
"job",
"was",
"not",
"run",
"or",
"failed"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L478-L490
|
145,208 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
NewListTrafficMonitorsParams
|
func (s *UsageService) NewListTrafficMonitorsParams(zoneid string) *ListTrafficMonitorsParams {
p := &ListTrafficMonitorsParams{}
p.p = make(map[string]interface{})
p.p["zoneid"] = zoneid
return p
}
|
go
|
func (s *UsageService) NewListTrafficMonitorsParams(zoneid string) *ListTrafficMonitorsParams {
p := &ListTrafficMonitorsParams{}
p.p = make(map[string]interface{})
p.p["zoneid"] = zoneid
return p
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"NewListTrafficMonitorsParams",
"(",
"zoneid",
"string",
")",
"*",
"ListTrafficMonitorsParams",
"{",
"p",
":=",
"&",
"ListTrafficMonitorsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"zoneid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new ListTrafficMonitorsParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListTrafficMonitorsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L576-L581
|
145,209 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
ListTrafficMonitors
|
func (s *UsageService) ListTrafficMonitors(p *ListTrafficMonitorsParams) (*ListTrafficMonitorsResponse, error) {
resp, err := s.cs.newRequest("listTrafficMonitors", p.toURLValues())
if err != nil {
return nil, err
}
var r ListTrafficMonitorsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *UsageService) ListTrafficMonitors(p *ListTrafficMonitorsParams) (*ListTrafficMonitorsResponse, error) {
resp, err := s.cs.newRequest("listTrafficMonitors", p.toURLValues())
if err != nil {
return nil, err
}
var r ListTrafficMonitorsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"ListTrafficMonitors",
"(",
"p",
"*",
"ListTrafficMonitorsParams",
")",
"(",
"*",
"ListTrafficMonitorsResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"ListTrafficMonitorsResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// List traffic monitor Hosts.
|
[
"List",
"traffic",
"monitor",
"Hosts",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L584-L596
|
145,210 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
NewListTrafficTypeImplementorsParams
|
func (s *UsageService) NewListTrafficTypeImplementorsParams() *ListTrafficTypeImplementorsParams {
p := &ListTrafficTypeImplementorsParams{}
p.p = make(map[string]interface{})
return p
}
|
go
|
func (s *UsageService) NewListTrafficTypeImplementorsParams() *ListTrafficTypeImplementorsParams {
p := &ListTrafficTypeImplementorsParams{}
p.p = make(map[string]interface{})
return p
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"NewListTrafficTypeImplementorsParams",
"(",
")",
"*",
"ListTrafficTypeImplementorsParams",
"{",
"p",
":=",
"&",
"ListTrafficTypeImplementorsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new ListTrafficTypeImplementorsParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListTrafficTypeImplementorsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L671-L675
|
145,211 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
ListTrafficTypeImplementors
|
func (s *UsageService) ListTrafficTypeImplementors(p *ListTrafficTypeImplementorsParams) (*ListTrafficTypeImplementorsResponse, error) {
resp, err := s.cs.newRequest("listTrafficTypeImplementors", p.toURLValues())
if err != nil {
return nil, err
}
var r ListTrafficTypeImplementorsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *UsageService) ListTrafficTypeImplementors(p *ListTrafficTypeImplementorsParams) (*ListTrafficTypeImplementorsResponse, error) {
resp, err := s.cs.newRequest("listTrafficTypeImplementors", p.toURLValues())
if err != nil {
return nil, err
}
var r ListTrafficTypeImplementorsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"ListTrafficTypeImplementors",
"(",
"p",
"*",
"ListTrafficTypeImplementorsParams",
")",
"(",
"*",
"ListTrafficTypeImplementorsResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"ListTrafficTypeImplementorsResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// Lists implementors of implementor of a network traffic type or implementors of all network traffic types
|
[
"Lists",
"implementors",
"of",
"implementor",
"of",
"a",
"network",
"traffic",
"type",
"or",
"implementors",
"of",
"all",
"network",
"traffic",
"types"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L678-L690
|
145,212 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
NewListTrafficTypesParams
|
func (s *UsageService) NewListTrafficTypesParams(physicalnetworkid string) *ListTrafficTypesParams {
p := &ListTrafficTypesParams{}
p.p = make(map[string]interface{})
p.p["physicalnetworkid"] = physicalnetworkid
return p
}
|
go
|
func (s *UsageService) NewListTrafficTypesParams(physicalnetworkid string) *ListTrafficTypesParams {
p := &ListTrafficTypesParams{}
p.p = make(map[string]interface{})
p.p["physicalnetworkid"] = physicalnetworkid
return p
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"NewListTrafficTypesParams",
"(",
"physicalnetworkid",
"string",
")",
"*",
"ListTrafficTypesParams",
"{",
"p",
":=",
"&",
"ListTrafficTypesParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"physicalnetworkid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new ListTrafficTypesParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListTrafficTypesParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L762-L767
|
145,213 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
ListTrafficTypes
|
func (s *UsageService) ListTrafficTypes(p *ListTrafficTypesParams) (*ListTrafficTypesResponse, error) {
resp, err := s.cs.newRequest("listTrafficTypes", p.toURLValues())
if err != nil {
return nil, err
}
var r ListTrafficTypesResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *UsageService) ListTrafficTypes(p *ListTrafficTypesParams) (*ListTrafficTypesResponse, error) {
resp, err := s.cs.newRequest("listTrafficTypes", p.toURLValues())
if err != nil {
return nil, err
}
var r ListTrafficTypesResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"ListTrafficTypes",
"(",
"p",
"*",
"ListTrafficTypesParams",
")",
"(",
"*",
"ListTrafficTypesResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"ListTrafficTypesResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// Lists traffic types of a given physical network.
|
[
"Lists",
"traffic",
"types",
"of",
"a",
"given",
"physical",
"network",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L807-L819
|
145,214 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
NewListUsageRecordsParams
|
func (s *UsageService) NewListUsageRecordsParams(enddate string, startdate string) *ListUsageRecordsParams {
p := &ListUsageRecordsParams{}
p.p = make(map[string]interface{})
p.p["enddate"] = enddate
p.p["startdate"] = startdate
return p
}
|
go
|
func (s *UsageService) NewListUsageRecordsParams(enddate string, startdate string) *ListUsageRecordsParams {
p := &ListUsageRecordsParams{}
p.p = make(map[string]interface{})
p.p["enddate"] = enddate
p.p["startdate"] = startdate
return p
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"NewListUsageRecordsParams",
"(",
"enddate",
"string",
",",
"startdate",
"string",
")",
"*",
"ListUsageRecordsParams",
"{",
"p",
":=",
"&",
"ListUsageRecordsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"enddate",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"startdate",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new ListUsageRecordsParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListUsageRecordsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L986-L992
|
145,215 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
ListUsageRecords
|
func (s *UsageService) ListUsageRecords(p *ListUsageRecordsParams) (*ListUsageRecordsResponse, error) {
resp, err := s.cs.newRequest("listUsageRecords", p.toURLValues())
if err != nil {
return nil, err
}
var r ListUsageRecordsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *UsageService) ListUsageRecords(p *ListUsageRecordsParams) (*ListUsageRecordsResponse, error) {
resp, err := s.cs.newRequest("listUsageRecords", p.toURLValues())
if err != nil {
return nil, err
}
var r ListUsageRecordsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"ListUsageRecords",
"(",
"p",
"*",
"ListUsageRecordsParams",
")",
"(",
"*",
"ListUsageRecordsResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"ListUsageRecordsResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// Lists usage records for accounts
|
[
"Lists",
"usage",
"records",
"for",
"accounts"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L995-L1007
|
145,216 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
NewListUsageTypesParams
|
func (s *UsageService) NewListUsageTypesParams() *ListUsageTypesParams {
p := &ListUsageTypesParams{}
p.p = make(map[string]interface{})
return p
}
|
go
|
func (s *UsageService) NewListUsageTypesParams() *ListUsageTypesParams {
p := &ListUsageTypesParams{}
p.p = make(map[string]interface{})
return p
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"NewListUsageTypesParams",
"(",
")",
"*",
"ListUsageTypesParams",
"{",
"p",
":=",
"&",
"ListUsageTypesParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new ListUsageTypesParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListUsageTypesParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L1059-L1063
|
145,217 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
ListUsageTypes
|
func (s *UsageService) ListUsageTypes(p *ListUsageTypesParams) (*ListUsageTypesResponse, error) {
resp, err := s.cs.newRequest("listUsageTypes", p.toURLValues())
if err != nil {
return nil, err
}
var r ListUsageTypesResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *UsageService) ListUsageTypes(p *ListUsageTypesParams) (*ListUsageTypesResponse, error) {
resp, err := s.cs.newRequest("listUsageTypes", p.toURLValues())
if err != nil {
return nil, err
}
var r ListUsageTypesResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"ListUsageTypes",
"(",
"p",
"*",
"ListUsageTypesParams",
")",
"(",
"*",
"ListUsageTypesResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"ListUsageTypesResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// List Usage Types
|
[
"List",
"Usage",
"Types"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L1066-L1078
|
145,218 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
NewRemoveRawUsageRecordsParams
|
func (s *UsageService) NewRemoveRawUsageRecordsParams(interval int) *RemoveRawUsageRecordsParams {
p := &RemoveRawUsageRecordsParams{}
p.p = make(map[string]interface{})
p.p["interval"] = interval
return p
}
|
go
|
func (s *UsageService) NewRemoveRawUsageRecordsParams(interval int) *RemoveRawUsageRecordsParams {
p := &RemoveRawUsageRecordsParams{}
p.p = make(map[string]interface{})
p.p["interval"] = interval
return p
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"NewRemoveRawUsageRecordsParams",
"(",
"interval",
"int",
")",
"*",
"RemoveRawUsageRecordsParams",
"{",
"p",
":=",
"&",
"RemoveRawUsageRecordsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"interval",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new RemoveRawUsageRecordsParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"RemoveRawUsageRecordsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L1116-L1121
|
145,219 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
RemoveRawUsageRecords
|
func (s *UsageService) RemoveRawUsageRecords(p *RemoveRawUsageRecordsParams) (*RemoveRawUsageRecordsResponse, error) {
resp, err := s.cs.newRequest("removeRawUsageRecords", p.toURLValues())
if err != nil {
return nil, err
}
var r RemoveRawUsageRecordsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *UsageService) RemoveRawUsageRecords(p *RemoveRawUsageRecordsParams) (*RemoveRawUsageRecordsResponse, error) {
resp, err := s.cs.newRequest("removeRawUsageRecords", p.toURLValues())
if err != nil {
return nil, err
}
var r RemoveRawUsageRecordsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"RemoveRawUsageRecords",
"(",
"p",
"*",
"RemoveRawUsageRecordsParams",
")",
"(",
"*",
"RemoveRawUsageRecordsResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"RemoveRawUsageRecordsResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// Safely removes raw records from cloud_usage table
|
[
"Safely",
"removes",
"raw",
"records",
"from",
"cloud_usage",
"table"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L1124-L1136
|
145,220 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
NewUpdateTrafficTypeParams
|
func (s *UsageService) NewUpdateTrafficTypeParams(id string) *UpdateTrafficTypeParams {
p := &UpdateTrafficTypeParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *UsageService) NewUpdateTrafficTypeParams(id string) *UpdateTrafficTypeParams {
p := &UpdateTrafficTypeParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"UsageService",
")",
"NewUpdateTrafficTypeParams",
"(",
"id",
"string",
")",
"*",
"UpdateTrafficTypeParams",
"{",
"p",
":=",
"&",
"UpdateTrafficTypeParams",
"{",
"}",
"\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 UpdateTrafficTypeParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"UpdateTrafficTypeParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L1242-L1247
|
145,221 |
xanzy/go-cloudstack
|
cloudstack/UsageService.go
|
UpdateTrafficType
|
func (s *UsageService) UpdateTrafficType(p *UpdateTrafficTypeParams) (*UpdateTrafficTypeResponse, error) {
resp, err := s.cs.newRequest("updateTrafficType", p.toURLValues())
if err != nil {
return nil, err
}
var r UpdateTrafficTypeResponse
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 *UsageService) UpdateTrafficType(p *UpdateTrafficTypeParams) (*UpdateTrafficTypeResponse, error) {
resp, err := s.cs.newRequest("updateTrafficType", p.toURLValues())
if err != nil {
return nil, err
}
var r UpdateTrafficTypeResponse
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",
"*",
"UsageService",
")",
"UpdateTrafficType",
"(",
"p",
"*",
"UpdateTrafficTypeParams",
")",
"(",
"*",
"UpdateTrafficTypeResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"UpdateTrafficTypeResponse",
"\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 traffic type of a physical network
|
[
"Updates",
"traffic",
"type",
"of",
"a",
"physical",
"network"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/UsageService.go#L1250-L1282
|
145,222 |
xanzy/go-cloudstack
|
cloudstack/DiskOfferingService.go
|
NewCreateDiskOfferingParams
|
func (s *DiskOfferingService) NewCreateDiskOfferingParams(displaytext string, name string) *CreateDiskOfferingParams {
p := &CreateDiskOfferingParams{}
p.p = make(map[string]interface{})
p.p["displaytext"] = displaytext
p.p["name"] = name
return p
}
|
go
|
func (s *DiskOfferingService) NewCreateDiskOfferingParams(displaytext string, name string) *CreateDiskOfferingParams {
p := &CreateDiskOfferingParams{}
p.p = make(map[string]interface{})
p.p["displaytext"] = displaytext
p.p["name"] = name
return p
}
|
[
"func",
"(",
"s",
"*",
"DiskOfferingService",
")",
"NewCreateDiskOfferingParams",
"(",
"displaytext",
"string",
",",
"name",
"string",
")",
"*",
"CreateDiskOfferingParams",
"{",
"p",
":=",
"&",
"CreateDiskOfferingParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"displaytext",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"name",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new CreateDiskOfferingParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"CreateDiskOfferingParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/DiskOfferingService.go#L239-L245
|
145,223 |
xanzy/go-cloudstack
|
cloudstack/DiskOfferingService.go
|
NewDeleteDiskOfferingParams
|
func (s *DiskOfferingService) NewDeleteDiskOfferingParams(id string) *DeleteDiskOfferingParams {
p := &DeleteDiskOfferingParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *DiskOfferingService) NewDeleteDiskOfferingParams(id string) *DeleteDiskOfferingParams {
p := &DeleteDiskOfferingParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"DiskOfferingService",
")",
"NewDeleteDiskOfferingParams",
"(",
"id",
"string",
")",
"*",
"DeleteDiskOfferingParams",
"{",
"p",
":=",
"&",
"DeleteDiskOfferingParams",
"{",
"}",
"\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 DeleteDiskOfferingParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"DeleteDiskOfferingParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/DiskOfferingService.go#L311-L316
|
145,224 |
xanzy/go-cloudstack
|
cloudstack/DiskOfferingService.go
|
NewListDiskOfferingsParams
|
func (s *DiskOfferingService) NewListDiskOfferingsParams() *ListDiskOfferingsParams {
p := &ListDiskOfferingsParams{}
p.p = make(map[string]interface{})
return p
}
|
go
|
func (s *DiskOfferingService) NewListDiskOfferingsParams() *ListDiskOfferingsParams {
p := &ListDiskOfferingsParams{}
p.p = make(map[string]interface{})
return p
}
|
[
"func",
"(",
"s",
"*",
"DiskOfferingService",
")",
"NewListDiskOfferingsParams",
"(",
")",
"*",
"ListDiskOfferingsParams",
"{",
"p",
":=",
"&",
"ListDiskOfferingsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new ListDiskOfferingsParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListDiskOfferingsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/DiskOfferingService.go#L463-L467
|
145,225 |
xanzy/go-cloudstack
|
cloudstack/DiskOfferingService.go
|
NewUpdateDiskOfferingParams
|
func (s *DiskOfferingService) NewUpdateDiskOfferingParams(id string) *UpdateDiskOfferingParams {
p := &UpdateDiskOfferingParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *DiskOfferingService) NewUpdateDiskOfferingParams(id string) *UpdateDiskOfferingParams {
p := &UpdateDiskOfferingParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"DiskOfferingService",
")",
"NewUpdateDiskOfferingParams",
"(",
"id",
"string",
")",
"*",
"UpdateDiskOfferingParams",
"{",
"p",
":=",
"&",
"UpdateDiskOfferingParams",
"{",
"}",
"\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 UpdateDiskOfferingParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"UpdateDiskOfferingParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/DiskOfferingService.go#L667-L672
|
145,226 |
xanzy/go-cloudstack
|
cloudstack/ResourcemetadataService.go
|
NewAddResourceDetailParams
|
func (s *ResourcemetadataService) NewAddResourceDetailParams(details map[string]string, resourceid string, resourcetype string) *AddResourceDetailParams {
p := &AddResourceDetailParams{}
p.p = make(map[string]interface{})
p.p["details"] = details
p.p["resourceid"] = resourceid
p.p["resourcetype"] = resourcetype
return p
}
|
go
|
func (s *ResourcemetadataService) NewAddResourceDetailParams(details map[string]string, resourceid string, resourcetype string) *AddResourceDetailParams {
p := &AddResourceDetailParams{}
p.p = make(map[string]interface{})
p.p["details"] = details
p.p["resourceid"] = resourceid
p.p["resourcetype"] = resourcetype
return p
}
|
[
"func",
"(",
"s",
"*",
"ResourcemetadataService",
")",
"NewAddResourceDetailParams",
"(",
"details",
"map",
"[",
"string",
"]",
"string",
",",
"resourceid",
"string",
",",
"resourcetype",
"string",
")",
"*",
"AddResourceDetailParams",
"{",
"p",
":=",
"&",
"AddResourceDetailParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"details",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"resourceid",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"resourcetype",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new AddResourceDetailParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"AddResourceDetailParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ResourcemetadataService.go#L89-L96
|
145,227 |
xanzy/go-cloudstack
|
cloudstack/ResourcemetadataService.go
|
AddResourceDetail
|
func (s *ResourcemetadataService) AddResourceDetail(p *AddResourceDetailParams) (*AddResourceDetailResponse, error) {
resp, err := s.cs.newRequest("addResourceDetail", p.toURLValues())
if err != nil {
return nil, err
}
var r AddResourceDetailResponse
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 *ResourcemetadataService) AddResourceDetail(p *AddResourceDetailParams) (*AddResourceDetailResponse, error) {
resp, err := s.cs.newRequest("addResourceDetail", p.toURLValues())
if err != nil {
return nil, err
}
var r AddResourceDetailResponse
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",
"*",
"ResourcemetadataService",
")",
"AddResourceDetail",
"(",
"p",
"*",
"AddResourceDetailParams",
")",
"(",
"*",
"AddResourceDetailResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"AddResourceDetailResponse",
"\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 detail for the Resource.
|
[
"Adds",
"detail",
"for",
"the",
"Resource",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ResourcemetadataService.go#L99-L126
|
145,228 |
xanzy/go-cloudstack
|
cloudstack/ResourcemetadataService.go
|
NewGetVolumeSnapshotDetailsParams
|
func (s *ResourcemetadataService) NewGetVolumeSnapshotDetailsParams(snapshotid string) *GetVolumeSnapshotDetailsParams {
p := &GetVolumeSnapshotDetailsParams{}
p.p = make(map[string]interface{})
p.p["snapshotid"] = snapshotid
return p
}
|
go
|
func (s *ResourcemetadataService) NewGetVolumeSnapshotDetailsParams(snapshotid string) *GetVolumeSnapshotDetailsParams {
p := &GetVolumeSnapshotDetailsParams{}
p.p = make(map[string]interface{})
p.p["snapshotid"] = snapshotid
return p
}
|
[
"func",
"(",
"s",
"*",
"ResourcemetadataService",
")",
"NewGetVolumeSnapshotDetailsParams",
"(",
"snapshotid",
"string",
")",
"*",
"GetVolumeSnapshotDetailsParams",
"{",
"p",
":=",
"&",
"GetVolumeSnapshotDetailsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"snapshotid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new GetVolumeSnapshotDetailsParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"GetVolumeSnapshotDetailsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ResourcemetadataService.go#L159-L164
|
145,229 |
xanzy/go-cloudstack
|
cloudstack/ResourcemetadataService.go
|
GetVolumeSnapshotDetails
|
func (s *ResourcemetadataService) GetVolumeSnapshotDetails(p *GetVolumeSnapshotDetailsParams) (*GetVolumeSnapshotDetailsResponse, error) {
resp, err := s.cs.newRequest("getVolumeSnapshotDetails", p.toURLValues())
if err != nil {
return nil, err
}
var r GetVolumeSnapshotDetailsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *ResourcemetadataService) GetVolumeSnapshotDetails(p *GetVolumeSnapshotDetailsParams) (*GetVolumeSnapshotDetailsResponse, error) {
resp, err := s.cs.newRequest("getVolumeSnapshotDetails", p.toURLValues())
if err != nil {
return nil, err
}
var r GetVolumeSnapshotDetailsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"ResourcemetadataService",
")",
"GetVolumeSnapshotDetails",
"(",
"p",
"*",
"GetVolumeSnapshotDetailsParams",
")",
"(",
"*",
"GetVolumeSnapshotDetailsResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"GetVolumeSnapshotDetailsResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// Get Volume Snapshot Details
|
[
"Get",
"Volume",
"Snapshot",
"Details"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ResourcemetadataService.go#L167-L179
|
145,230 |
xanzy/go-cloudstack
|
cloudstack/ResourcemetadataService.go
|
NewListResourceDetailsParams
|
func (s *ResourcemetadataService) NewListResourceDetailsParams(resourcetype string) *ListResourceDetailsParams {
p := &ListResourceDetailsParams{}
p.p = make(map[string]interface{})
p.p["resourcetype"] = resourcetype
return p
}
|
go
|
func (s *ResourcemetadataService) NewListResourceDetailsParams(resourcetype string) *ListResourceDetailsParams {
p := &ListResourceDetailsParams{}
p.p = make(map[string]interface{})
p.p["resourcetype"] = resourcetype
return p
}
|
[
"func",
"(",
"s",
"*",
"ResourcemetadataService",
")",
"NewListResourceDetailsParams",
"(",
"resourcetype",
"string",
")",
"*",
"ListResourceDetailsParams",
"{",
"p",
":=",
"&",
"ListResourceDetailsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"resourcetype",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new ListResourceDetailsParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListResourceDetailsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ResourcemetadataService.go#L347-L352
|
145,231 |
xanzy/go-cloudstack
|
cloudstack/ResourcemetadataService.go
|
NewRemoveResourceDetailParams
|
func (s *ResourcemetadataService) NewRemoveResourceDetailParams(resourceid string, resourcetype string) *RemoveResourceDetailParams {
p := &RemoveResourceDetailParams{}
p.p = make(map[string]interface{})
p.p["resourceid"] = resourceid
p.p["resourcetype"] = resourcetype
return p
}
|
go
|
func (s *ResourcemetadataService) NewRemoveResourceDetailParams(resourceid string, resourcetype string) *RemoveResourceDetailParams {
p := &RemoveResourceDetailParams{}
p.p = make(map[string]interface{})
p.p["resourceid"] = resourceid
p.p["resourcetype"] = resourcetype
return p
}
|
[
"func",
"(",
"s",
"*",
"ResourcemetadataService",
")",
"NewRemoveResourceDetailParams",
"(",
"resourceid",
"string",
",",
"resourcetype",
"string",
")",
"*",
"RemoveResourceDetailParams",
"{",
"p",
":=",
"&",
"RemoveResourceDetailParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"resourceid",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"resourcetype",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new RemoveResourceDetailParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"RemoveResourceDetailParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ResourcemetadataService.go#L434-L440
|
145,232 |
xanzy/go-cloudstack
|
cloudstack/ResourcemetadataService.go
|
RemoveResourceDetail
|
func (s *ResourcemetadataService) RemoveResourceDetail(p *RemoveResourceDetailParams) (*RemoveResourceDetailResponse, error) {
resp, err := s.cs.newRequest("removeResourceDetail", p.toURLValues())
if err != nil {
return nil, err
}
var r RemoveResourceDetailResponse
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 *ResourcemetadataService) RemoveResourceDetail(p *RemoveResourceDetailParams) (*RemoveResourceDetailResponse, error) {
resp, err := s.cs.newRequest("removeResourceDetail", p.toURLValues())
if err != nil {
return nil, err
}
var r RemoveResourceDetailResponse
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",
"*",
"ResourcemetadataService",
")",
"RemoveResourceDetail",
"(",
"p",
"*",
"RemoveResourceDetailParams",
")",
"(",
"*",
"RemoveResourceDetailResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"RemoveResourceDetailResponse",
"\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 detail for the Resource.
|
[
"Removes",
"detail",
"for",
"the",
"Resource",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ResourcemetadataService.go#L443-L470
|
145,233 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewAddNicToVirtualMachineParams
|
func (s *VirtualMachineService) NewAddNicToVirtualMachineParams(networkid string, virtualmachineid string) *AddNicToVirtualMachineParams {
p := &AddNicToVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["networkid"] = networkid
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
go
|
func (s *VirtualMachineService) NewAddNicToVirtualMachineParams(networkid string, virtualmachineid string) *AddNicToVirtualMachineParams {
p := &AddNicToVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["networkid"] = networkid
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewAddNicToVirtualMachineParams",
"(",
"networkid",
"string",
",",
"virtualmachineid",
"string",
")",
"*",
"AddNicToVirtualMachineParams",
"{",
"p",
":=",
"&",
"AddNicToVirtualMachineParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"networkid",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"virtualmachineid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new AddNicToVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"AddNicToVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L101-L107
|
145,234 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewAssignVirtualMachineParams
|
func (s *VirtualMachineService) NewAssignVirtualMachineParams(virtualmachineid string) *AssignVirtualMachineParams {
p := &AssignVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
go
|
func (s *VirtualMachineService) NewAssignVirtualMachineParams(virtualmachineid string) *AssignVirtualMachineParams {
p := &AssignVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewAssignVirtualMachineParams",
"(",
"virtualmachineid",
"string",
")",
"*",
"AssignVirtualMachineParams",
"{",
"p",
":=",
"&",
"AssignVirtualMachineParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"virtualmachineid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new AssignVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"AssignVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L334-L339
|
145,235 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewChangeServiceForVirtualMachineParams
|
func (s *VirtualMachineService) NewChangeServiceForVirtualMachineParams(id string, serviceofferingid string) *ChangeServiceForVirtualMachineParams {
p := &ChangeServiceForVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
p.p["serviceofferingid"] = serviceofferingid
return p
}
|
go
|
func (s *VirtualMachineService) NewChangeServiceForVirtualMachineParams(id string, serviceofferingid string) *ChangeServiceForVirtualMachineParams {
p := &ChangeServiceForVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
p.p["serviceofferingid"] = serviceofferingid
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewChangeServiceForVirtualMachineParams",
"(",
"id",
"string",
",",
"serviceofferingid",
"string",
")",
"*",
"ChangeServiceForVirtualMachineParams",
"{",
"p",
":=",
"&",
"ChangeServiceForVirtualMachineParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"id",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"serviceofferingid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new ChangeServiceForVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ChangeServiceForVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L514-L520
|
145,236 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewCleanVMReservationsParams
|
func (s *VirtualMachineService) NewCleanVMReservationsParams() *CleanVMReservationsParams {
p := &CleanVMReservationsParams{}
p.p = make(map[string]interface{})
return p
}
|
go
|
func (s *VirtualMachineService) NewCleanVMReservationsParams() *CleanVMReservationsParams {
p := &CleanVMReservationsParams{}
p.p = make(map[string]interface{})
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewCleanVMReservationsParams",
"(",
")",
"*",
"CleanVMReservationsParams",
"{",
"p",
":=",
"&",
"CleanVMReservationsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new CleanVMReservationsParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"CleanVMReservationsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L658-L662
|
145,237 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewDeployVirtualMachineParams
|
func (s *VirtualMachineService) NewDeployVirtualMachineParams(serviceofferingid string, templateid string, zoneid string) *DeployVirtualMachineParams {
p := &DeployVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["serviceofferingid"] = serviceofferingid
p.p["templateid"] = templateid
p.p["zoneid"] = zoneid
return p
}
|
go
|
func (s *VirtualMachineService) NewDeployVirtualMachineParams(serviceofferingid string, templateid string, zoneid string) *DeployVirtualMachineParams {
p := &DeployVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["serviceofferingid"] = serviceofferingid
p.p["templateid"] = templateid
p.p["zoneid"] = zoneid
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewDeployVirtualMachineParams",
"(",
"serviceofferingid",
"string",
",",
"templateid",
"string",
",",
"zoneid",
"string",
")",
"*",
"DeployVirtualMachineParams",
"{",
"p",
":=",
"&",
"DeployVirtualMachineParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"serviceofferingid",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"templateid",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"zoneid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new DeployVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"DeployVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L1105-L1112
|
145,238 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewDestroyVirtualMachineParams
|
func (s *VirtualMachineService) NewDestroyVirtualMachineParams(id string) *DestroyVirtualMachineParams {
p := &DestroyVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *VirtualMachineService) NewDestroyVirtualMachineParams(id string) *DestroyVirtualMachineParams {
p := &DestroyVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewDestroyVirtualMachineParams",
"(",
"id",
"string",
")",
"*",
"DestroyVirtualMachineParams",
"{",
"p",
":=",
"&",
"DestroyVirtualMachineParams",
"{",
"}",
"\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 DestroyVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"DestroyVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L1294-L1299
|
145,239 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
DestroyVirtualMachine
|
func (s *VirtualMachineService) DestroyVirtualMachine(p *DestroyVirtualMachineParams) (*DestroyVirtualMachineResponse, error) {
resp, err := s.cs.newRequest("destroyVirtualMachine", p.toURLValues())
if err != nil {
return nil, err
}
var r DestroyVirtualMachineResponse
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 *VirtualMachineService) DestroyVirtualMachine(p *DestroyVirtualMachineParams) (*DestroyVirtualMachineResponse, error) {
resp, err := s.cs.newRequest("destroyVirtualMachine", p.toURLValues())
if err != nil {
return nil, err
}
var r DestroyVirtualMachineResponse
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",
"*",
"VirtualMachineService",
")",
"DestroyVirtualMachine",
"(",
"p",
"*",
"DestroyVirtualMachineParams",
")",
"(",
"*",
"DestroyVirtualMachineResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"DestroyVirtualMachineResponse",
"\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",
"}"
] |
// Destroys a virtual machine.
|
[
"Destroys",
"a",
"virtual",
"machine",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L1302-L1334
|
145,240 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewExpungeVirtualMachineParams
|
func (s *VirtualMachineService) NewExpungeVirtualMachineParams(id string) *ExpungeVirtualMachineParams {
p := &ExpungeVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *VirtualMachineService) NewExpungeVirtualMachineParams(id string) *ExpungeVirtualMachineParams {
p := &ExpungeVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewExpungeVirtualMachineParams",
"(",
"id",
"string",
")",
"*",
"ExpungeVirtualMachineParams",
"{",
"p",
":=",
"&",
"ExpungeVirtualMachineParams",
"{",
"}",
"\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 ExpungeVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ExpungeVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L1469-L1474
|
145,241 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewGetVMPasswordParams
|
func (s *VirtualMachineService) NewGetVMPasswordParams(id string) *GetVMPasswordParams {
p := &GetVMPasswordParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *VirtualMachineService) NewGetVMPasswordParams(id string) *GetVMPasswordParams {
p := &GetVMPasswordParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewGetVMPasswordParams",
"(",
"id",
"string",
")",
"*",
"GetVMPasswordParams",
"{",
"p",
":=",
"&",
"GetVMPasswordParams",
"{",
"}",
"\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 GetVMPasswordParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"GetVMPasswordParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L1537-L1542
|
145,242 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewListVirtualMachinesParams
|
func (s *VirtualMachineService) NewListVirtualMachinesParams() *ListVirtualMachinesParams {
p := &ListVirtualMachinesParams{}
p.p = make(map[string]interface{})
return p
}
|
go
|
func (s *VirtualMachineService) NewListVirtualMachinesParams() *ListVirtualMachinesParams {
p := &ListVirtualMachinesParams{}
p.p = make(map[string]interface{})
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewListVirtualMachinesParams",
"(",
")",
"*",
"ListVirtualMachinesParams",
"{",
"p",
":=",
"&",
"ListVirtualMachinesParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new ListVirtualMachinesParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListVirtualMachinesParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L1920-L1924
|
145,243 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewMigrateVirtualMachineParams
|
func (s *VirtualMachineService) NewMigrateVirtualMachineParams(virtualmachineid string) *MigrateVirtualMachineParams {
p := &MigrateVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
go
|
func (s *VirtualMachineService) NewMigrateVirtualMachineParams(virtualmachineid string) *MigrateVirtualMachineParams {
p := &MigrateVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewMigrateVirtualMachineParams",
"(",
"virtualmachineid",
"string",
")",
"*",
"MigrateVirtualMachineParams",
"{",
"p",
":=",
"&",
"MigrateVirtualMachineParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"virtualmachineid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new MigrateVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"MigrateVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L2183-L2188
|
145,244 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewMigrateVirtualMachineWithVolumeParams
|
func (s *VirtualMachineService) NewMigrateVirtualMachineWithVolumeParams(hostid string, virtualmachineid string) *MigrateVirtualMachineWithVolumeParams {
p := &MigrateVirtualMachineWithVolumeParams{}
p.p = make(map[string]interface{})
p.p["hostid"] = hostid
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
go
|
func (s *VirtualMachineService) NewMigrateVirtualMachineWithVolumeParams(hostid string, virtualmachineid string) *MigrateVirtualMachineWithVolumeParams {
p := &MigrateVirtualMachineWithVolumeParams{}
p.p = make(map[string]interface{})
p.p["hostid"] = hostid
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewMigrateVirtualMachineWithVolumeParams",
"(",
"hostid",
"string",
",",
"virtualmachineid",
"string",
")",
"*",
"MigrateVirtualMachineWithVolumeParams",
"{",
"p",
":=",
"&",
"MigrateVirtualMachineWithVolumeParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"hostid",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"virtualmachineid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new MigrateVirtualMachineWithVolumeParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"MigrateVirtualMachineWithVolumeParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L2385-L2391
|
145,245 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewRebootVirtualMachineParams
|
func (s *VirtualMachineService) NewRebootVirtualMachineParams(id string) *RebootVirtualMachineParams {
p := &RebootVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *VirtualMachineService) NewRebootVirtualMachineParams(id string) *RebootVirtualMachineParams {
p := &RebootVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewRebootVirtualMachineParams",
"(",
"id",
"string",
")",
"*",
"RebootVirtualMachineParams",
"{",
"p",
":=",
"&",
"RebootVirtualMachineParams",
"{",
"}",
"\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 RebootVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"RebootVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L2561-L2566
|
145,246 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewRecoverVirtualMachineParams
|
func (s *VirtualMachineService) NewRecoverVirtualMachineParams(id string) *RecoverVirtualMachineParams {
p := &RecoverVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *VirtualMachineService) NewRecoverVirtualMachineParams(id string) *RecoverVirtualMachineParams {
p := &RecoverVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewRecoverVirtualMachineParams",
"(",
"id",
"string",
")",
"*",
"RecoverVirtualMachineParams",
"{",
"p",
":=",
"&",
"RecoverVirtualMachineParams",
"{",
"}",
"\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 RecoverVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"RecoverVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L2736-L2741
|
145,247 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewRemoveNicFromVirtualMachineParams
|
func (s *VirtualMachineService) NewRemoveNicFromVirtualMachineParams(nicid string, virtualmachineid string) *RemoveNicFromVirtualMachineParams {
p := &RemoveNicFromVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["nicid"] = nicid
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
go
|
func (s *VirtualMachineService) NewRemoveNicFromVirtualMachineParams(nicid string, virtualmachineid string) *RemoveNicFromVirtualMachineParams {
p := &RemoveNicFromVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["nicid"] = nicid
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewRemoveNicFromVirtualMachineParams",
"(",
"nicid",
"string",
",",
"virtualmachineid",
"string",
")",
"*",
"RemoveNicFromVirtualMachineParams",
"{",
"p",
":=",
"&",
"RemoveNicFromVirtualMachineParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"nicid",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"virtualmachineid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new RemoveNicFromVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"RemoveNicFromVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L2901-L2907
|
145,248 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewResetPasswordForVirtualMachineParams
|
func (s *VirtualMachineService) NewResetPasswordForVirtualMachineParams(id string) *ResetPasswordForVirtualMachineParams {
p := &ResetPasswordForVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *VirtualMachineService) NewResetPasswordForVirtualMachineParams(id string) *ResetPasswordForVirtualMachineParams {
p := &ResetPasswordForVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewResetPasswordForVirtualMachineParams",
"(",
"id",
"string",
")",
"*",
"ResetPasswordForVirtualMachineParams",
"{",
"p",
":=",
"&",
"ResetPasswordForVirtualMachineParams",
"{",
"}",
"\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 ResetPasswordForVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ResetPasswordForVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L3077-L3082
|
145,249 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewRestoreVirtualMachineParams
|
func (s *VirtualMachineService) NewRestoreVirtualMachineParams(virtualmachineid string) *RestoreVirtualMachineParams {
p := &RestoreVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
go
|
func (s *VirtualMachineService) NewRestoreVirtualMachineParams(virtualmachineid string) *RestoreVirtualMachineParams {
p := &RestoreVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewRestoreVirtualMachineParams",
"(",
"virtualmachineid",
"string",
")",
"*",
"RestoreVirtualMachineParams",
"{",
"p",
":=",
"&",
"RestoreVirtualMachineParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"virtualmachineid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new RestoreVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"RestoreVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L3263-L3268
|
145,250 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewScaleVirtualMachineParams
|
func (s *VirtualMachineService) NewScaleVirtualMachineParams(id string, serviceofferingid string) *ScaleVirtualMachineParams {
p := &ScaleVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
p.p["serviceofferingid"] = serviceofferingid
return p
}
|
go
|
func (s *VirtualMachineService) NewScaleVirtualMachineParams(id string, serviceofferingid string) *ScaleVirtualMachineParams {
p := &ScaleVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
p.p["serviceofferingid"] = serviceofferingid
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewScaleVirtualMachineParams",
"(",
"id",
"string",
",",
"serviceofferingid",
"string",
")",
"*",
"ScaleVirtualMachineParams",
"{",
"p",
":=",
"&",
"ScaleVirtualMachineParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"id",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"serviceofferingid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new ScaleVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ScaleVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L3464-L3470
|
145,251 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewStartVirtualMachineParams
|
func (s *VirtualMachineService) NewStartVirtualMachineParams(id string) *StartVirtualMachineParams {
p := &StartVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *VirtualMachineService) NewStartVirtualMachineParams(id string) *StartVirtualMachineParams {
p := &StartVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewStartVirtualMachineParams",
"(",
"id",
"string",
")",
"*",
"StartVirtualMachineParams",
"{",
"p",
":=",
"&",
"StartVirtualMachineParams",
"{",
"}",
"\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 StartVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"StartVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L3555-L3560
|
145,252 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewStopVirtualMachineParams
|
func (s *VirtualMachineService) NewStopVirtualMachineParams(id string) *StopVirtualMachineParams {
p := &StopVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *VirtualMachineService) NewStopVirtualMachineParams(id string) *StopVirtualMachineParams {
p := &StopVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewStopVirtualMachineParams",
"(",
"id",
"string",
")",
"*",
"StopVirtualMachineParams",
"{",
"p",
":=",
"&",
"StopVirtualMachineParams",
"{",
"}",
"\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 StopVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"StopVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L3742-L3747
|
145,253 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewUpdateDefaultNicForVirtualMachineParams
|
func (s *VirtualMachineService) NewUpdateDefaultNicForVirtualMachineParams(nicid string, virtualmachineid string) *UpdateDefaultNicForVirtualMachineParams {
p := &UpdateDefaultNicForVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["nicid"] = nicid
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
go
|
func (s *VirtualMachineService) NewUpdateDefaultNicForVirtualMachineParams(nicid string, virtualmachineid string) *UpdateDefaultNicForVirtualMachineParams {
p := &UpdateDefaultNicForVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["nicid"] = nicid
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewUpdateDefaultNicForVirtualMachineParams",
"(",
"nicid",
"string",
",",
"virtualmachineid",
"string",
")",
"*",
"UpdateDefaultNicForVirtualMachineParams",
"{",
"p",
":=",
"&",
"UpdateDefaultNicForVirtualMachineParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"nicid",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"virtualmachineid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new UpdateDefaultNicForVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"UpdateDefaultNicForVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L3928-L3934
|
145,254 |
xanzy/go-cloudstack
|
cloudstack/VirtualMachineService.go
|
NewUpdateVirtualMachineParams
|
func (s *VirtualMachineService) NewUpdateVirtualMachineParams(id string) *UpdateVirtualMachineParams {
p := &UpdateVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *VirtualMachineService) NewUpdateVirtualMachineParams(id string) *UpdateVirtualMachineParams {
p := &UpdateVirtualMachineParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"VirtualMachineService",
")",
"NewUpdateVirtualMachineParams",
"(",
"id",
"string",
")",
"*",
"UpdateVirtualMachineParams",
"{",
"p",
":=",
"&",
"UpdateVirtualMachineParams",
"{",
"}",
"\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 UpdateVirtualMachineParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"UpdateVirtualMachineParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VirtualMachineService.go#L4284-L4289
|
145,255 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
NewAttachIsoParams
|
func (s *ISOService) NewAttachIsoParams(id string, virtualmachineid string) *AttachIsoParams {
p := &AttachIsoParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
go
|
func (s *ISOService) NewAttachIsoParams(id string, virtualmachineid string) *AttachIsoParams {
p := &AttachIsoParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"NewAttachIsoParams",
"(",
"id",
"string",
",",
"virtualmachineid",
"string",
")",
"*",
"AttachIsoParams",
"{",
"p",
":=",
"&",
"AttachIsoParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"id",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"virtualmachineid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new AttachIsoParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"AttachIsoParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L63-L69
|
145,256 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
AttachIso
|
func (s *ISOService) AttachIso(p *AttachIsoParams) (*AttachIsoResponse, error) {
resp, err := s.cs.newRequest("attachIso", p.toURLValues())
if err != nil {
return nil, err
}
var r AttachIsoResponse
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 *ISOService) AttachIso(p *AttachIsoParams) (*AttachIsoResponse, error) {
resp, err := s.cs.newRequest("attachIso", p.toURLValues())
if err != nil {
return nil, err
}
var r AttachIsoResponse
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",
"*",
"ISOService",
")",
"AttachIso",
"(",
"p",
"*",
"AttachIsoParams",
")",
"(",
"*",
"AttachIsoResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"AttachIsoResponse",
"\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",
"}"
] |
// Attaches an ISO to a virtual machine.
|
[
"Attaches",
"an",
"ISO",
"to",
"a",
"virtual",
"machine",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L72-L104
|
145,257 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
NewCopyIsoParams
|
func (s *ISOService) NewCopyIsoParams(id string) *CopyIsoParams {
p := &CopyIsoParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *ISOService) NewCopyIsoParams(id string) *CopyIsoParams {
p := &CopyIsoParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"NewCopyIsoParams",
"(",
"id",
"string",
")",
"*",
"CopyIsoParams",
"{",
"p",
":=",
"&",
"CopyIsoParams",
"{",
"}",
"\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 CopyIsoParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"CopyIsoParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L273-L278
|
145,258 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
CopyIso
|
func (s *ISOService) CopyIso(p *CopyIsoParams) (*CopyIsoResponse, error) {
resp, err := s.cs.newRequest("copyIso", p.toURLValues())
if err != nil {
return nil, err
}
var r CopyIsoResponse
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 *ISOService) CopyIso(p *CopyIsoParams) (*CopyIsoResponse, error) {
resp, err := s.cs.newRequest("copyIso", p.toURLValues())
if err != nil {
return nil, err
}
var r CopyIsoResponse
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",
"*",
"ISOService",
")",
"CopyIso",
"(",
"p",
"*",
"CopyIsoParams",
")",
"(",
"*",
"CopyIsoResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"CopyIsoResponse",
"\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",
"}"
] |
// Copies an iso from one zone to another.
|
[
"Copies",
"an",
"iso",
"from",
"one",
"zone",
"to",
"another",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L281-L313
|
145,259 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
NewDeleteIsoParams
|
func (s *ISOService) NewDeleteIsoParams(id string) *DeleteIsoParams {
p := &DeleteIsoParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *ISOService) NewDeleteIsoParams(id string) *DeleteIsoParams {
p := &DeleteIsoParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"NewDeleteIsoParams",
"(",
"id",
"string",
")",
"*",
"DeleteIsoParams",
"{",
"p",
":=",
"&",
"DeleteIsoParams",
"{",
"}",
"\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 DeleteIsoParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"DeleteIsoParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L395-L400
|
145,260 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
DeleteIso
|
func (s *ISOService) DeleteIso(p *DeleteIsoParams) (*DeleteIsoResponse, error) {
resp, err := s.cs.newRequest("deleteIso", p.toURLValues())
if err != nil {
return nil, err
}
var r DeleteIsoResponse
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 *ISOService) DeleteIso(p *DeleteIsoParams) (*DeleteIsoResponse, error) {
resp, err := s.cs.newRequest("deleteIso", p.toURLValues())
if err != nil {
return nil, err
}
var r DeleteIsoResponse
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",
"*",
"ISOService",
")",
"DeleteIso",
"(",
"p",
"*",
"DeleteIsoParams",
")",
"(",
"*",
"DeleteIsoResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"DeleteIsoResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"// If we have a async client, we need to wait for the async result",
"if",
"s",
".",
"cs",
".",
"async",
"{",
"b",
",",
"err",
":=",
"s",
".",
"cs",
".",
"GetAsyncJobResult",
"(",
"r",
".",
"JobID",
",",
"s",
".",
"cs",
".",
"timeout",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"if",
"err",
"==",
"AsyncTimeoutErr",
"{",
"return",
"&",
"r",
",",
"err",
"\n",
"}",
"\n",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"b",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// Deletes an ISO file.
|
[
"Deletes",
"an",
"ISO",
"file",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L403-L430
|
145,261 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
NewDetachIsoParams
|
func (s *ISOService) NewDetachIsoParams(virtualmachineid string) *DetachIsoParams {
p := &DetachIsoParams{}
p.p = make(map[string]interface{})
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
go
|
func (s *ISOService) NewDetachIsoParams(virtualmachineid string) *DetachIsoParams {
p := &DetachIsoParams{}
p.p = make(map[string]interface{})
p.p["virtualmachineid"] = virtualmachineid
return p
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"NewDetachIsoParams",
"(",
"virtualmachineid",
"string",
")",
"*",
"DetachIsoParams",
"{",
"p",
":=",
"&",
"DetachIsoParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"virtualmachineid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new DetachIsoParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"DetachIsoParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L463-L468
|
145,262 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
NewExtractIsoParams
|
func (s *ISOService) NewExtractIsoParams(id string, mode string) *ExtractIsoParams {
p := &ExtractIsoParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
p.p["mode"] = mode
return p
}
|
go
|
func (s *ISOService) NewExtractIsoParams(id string, mode string) *ExtractIsoParams {
p := &ExtractIsoParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
p.p["mode"] = mode
return p
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"NewExtractIsoParams",
"(",
"id",
"string",
",",
"mode",
"string",
")",
"*",
"ExtractIsoParams",
"{",
"p",
":=",
"&",
"ExtractIsoParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"id",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"mode",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new ExtractIsoParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ExtractIsoParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L671-L677
|
145,263 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
ExtractIso
|
func (s *ISOService) ExtractIso(p *ExtractIsoParams) (*ExtractIsoResponse, error) {
resp, err := s.cs.newRequest("extractIso", p.toURLValues())
if err != nil {
return nil, err
}
var r ExtractIsoResponse
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 *ISOService) ExtractIso(p *ExtractIsoParams) (*ExtractIsoResponse, error) {
resp, err := s.cs.newRequest("extractIso", p.toURLValues())
if err != nil {
return nil, err
}
var r ExtractIsoResponse
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",
"*",
"ISOService",
")",
"ExtractIso",
"(",
"p",
"*",
"ExtractIsoParams",
")",
"(",
"*",
"ExtractIsoResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"ExtractIsoResponse",
"\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",
"}"
] |
// Extracts an ISO
|
[
"Extracts",
"an",
"ISO"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L680-L712
|
145,264 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
NewListIsoPermissionsParams
|
func (s *ISOService) NewListIsoPermissionsParams(id string) *ListIsoPermissionsParams {
p := &ListIsoPermissionsParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *ISOService) NewListIsoPermissionsParams(id string) *ListIsoPermissionsParams {
p := &ListIsoPermissionsParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"NewListIsoPermissionsParams",
"(",
"id",
"string",
")",
"*",
"ListIsoPermissionsParams",
"{",
"p",
":=",
"&",
"ListIsoPermissionsParams",
"{",
"}",
"\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 ListIsoPermissionsParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListIsoPermissionsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L757-L762
|
145,265 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
ListIsoPermissions
|
func (s *ISOService) ListIsoPermissions(p *ListIsoPermissionsParams) (*ListIsoPermissionsResponse, error) {
resp, err := s.cs.newRequest("listIsoPermissions", p.toURLValues())
if err != nil {
return nil, err
}
var r ListIsoPermissionsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *ISOService) ListIsoPermissions(p *ListIsoPermissionsParams) (*ListIsoPermissionsResponse, error) {
resp, err := s.cs.newRequest("listIsoPermissions", p.toURLValues())
if err != nil {
return nil, err
}
var r ListIsoPermissionsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"ListIsoPermissions",
"(",
"p",
"*",
"ListIsoPermissionsParams",
")",
"(",
"*",
"ListIsoPermissionsResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"ListIsoPermissionsResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// List iso visibility and all accounts that have permissions to view this iso.
|
[
"List",
"iso",
"visibility",
"and",
"all",
"accounts",
"that",
"have",
"permissions",
"to",
"view",
"this",
"iso",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L798-L810
|
145,266 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
NewListIsosParams
|
func (s *ISOService) NewListIsosParams() *ListIsosParams {
p := &ListIsosParams{}
p.p = make(map[string]interface{})
return p
}
|
go
|
func (s *ISOService) NewListIsosParams() *ListIsosParams {
p := &ListIsosParams{}
p.p = make(map[string]interface{})
return p
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"NewListIsosParams",
"(",
")",
"*",
"ListIsosParams",
"{",
"p",
":=",
"&",
"ListIsosParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new ListIsosParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListIsosParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L1050-L1054
|
145,267 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
ListIsos
|
func (s *ISOService) ListIsos(p *ListIsosParams) (*ListIsosResponse, error) {
resp, err := s.cs.newRequest("listIsos", p.toURLValues())
if err != nil {
return nil, err
}
var r ListIsosResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *ISOService) ListIsos(p *ListIsosParams) (*ListIsosResponse, error) {
resp, err := s.cs.newRequest("listIsos", p.toURLValues())
if err != nil {
return nil, err
}
var r ListIsosResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"ListIsos",
"(",
"p",
"*",
"ListIsosParams",
")",
"(",
"*",
"ListIsosResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"ListIsosResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// Lists all available ISO files.
|
[
"Lists",
"all",
"available",
"ISO",
"files",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L1142-L1154
|
145,268 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
NewRegisterIsoParams
|
func (s *ISOService) NewRegisterIsoParams(displaytext string, name string, url string, zoneid string) *RegisterIsoParams {
p := &RegisterIsoParams{}
p.p = make(map[string]interface{})
p.p["displaytext"] = displaytext
p.p["name"] = name
p.p["url"] = url
p.p["zoneid"] = zoneid
return p
}
|
go
|
func (s *ISOService) NewRegisterIsoParams(displaytext string, name string, url string, zoneid string) *RegisterIsoParams {
p := &RegisterIsoParams{}
p.p = make(map[string]interface{})
p.p["displaytext"] = displaytext
p.p["name"] = name
p.p["url"] = url
p.p["zoneid"] = zoneid
return p
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"NewRegisterIsoParams",
"(",
"displaytext",
"string",
",",
"name",
"string",
",",
"url",
"string",
",",
"zoneid",
"string",
")",
"*",
"RegisterIsoParams",
"{",
"p",
":=",
"&",
"RegisterIsoParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"displaytext",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"name",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"url",
"\n",
"p",
".",
"p",
"[",
"\"",
"\"",
"]",
"=",
"zoneid",
"\n",
"return",
"p",
"\n",
"}"
] |
// You should always use this function to get a new RegisterIsoParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"RegisterIsoParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L1400-L1408
|
145,269 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
RegisterIso
|
func (s *ISOService) RegisterIso(p *RegisterIsoParams) (*RegisterIsoResponse, error) {
resp, err := s.cs.newRequest("registerIso", p.toURLValues())
if err != nil {
return nil, err
}
var r RegisterIsoResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *ISOService) RegisterIso(p *RegisterIsoParams) (*RegisterIsoResponse, error) {
resp, err := s.cs.newRequest("registerIso", p.toURLValues())
if err != nil {
return nil, err
}
var r RegisterIsoResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"RegisterIso",
"(",
"p",
"*",
"RegisterIsoParams",
")",
"(",
"*",
"RegisterIsoResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"RegisterIsoResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// Registers an existing ISO into the CloudStack Cloud.
|
[
"Registers",
"an",
"existing",
"ISO",
"into",
"the",
"CloudStack",
"Cloud",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L1411-L1423
|
145,270 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
NewUpdateIsoParams
|
func (s *ISOService) NewUpdateIsoParams(id string) *UpdateIsoParams {
p := &UpdateIsoParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *ISOService) NewUpdateIsoParams(id string) *UpdateIsoParams {
p := &UpdateIsoParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"NewUpdateIsoParams",
"(",
"id",
"string",
")",
"*",
"UpdateIsoParams",
"{",
"p",
":=",
"&",
"UpdateIsoParams",
"{",
"}",
"\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 UpdateIsoParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"UpdateIsoParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L1636-L1641
|
145,271 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
UpdateIso
|
func (s *ISOService) UpdateIso(p *UpdateIsoParams) (*UpdateIsoResponse, error) {
resp, err := s.cs.newRequest("updateIso", p.toURLValues())
if err != nil {
return nil, err
}
var r UpdateIsoResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
go
|
func (s *ISOService) UpdateIso(p *UpdateIsoParams) (*UpdateIsoResponse, error) {
resp, err := s.cs.newRequest("updateIso", p.toURLValues())
if err != nil {
return nil, err
}
var r UpdateIsoResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"UpdateIso",
"(",
"p",
"*",
"UpdateIsoParams",
")",
"(",
"*",
"UpdateIsoResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"toURLValues",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"r",
"UpdateIsoResponse",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"resp",
",",
"&",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"r",
",",
"nil",
"\n",
"}"
] |
// Updates an ISO file.
|
[
"Updates",
"an",
"ISO",
"file",
"."
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L1644-L1656
|
145,272 |
xanzy/go-cloudstack
|
cloudstack/ISOService.go
|
NewUpdateIsoPermissionsParams
|
func (s *ISOService) NewUpdateIsoPermissionsParams(id string) *UpdateIsoPermissionsParams {
p := &UpdateIsoPermissionsParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
go
|
func (s *ISOService) NewUpdateIsoPermissionsParams(id string) *UpdateIsoPermissionsParams {
p := &UpdateIsoPermissionsParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}
|
[
"func",
"(",
"s",
"*",
"ISOService",
")",
"NewUpdateIsoPermissionsParams",
"(",
"id",
"string",
")",
"*",
"UpdateIsoPermissionsParams",
"{",
"p",
":=",
"&",
"UpdateIsoPermissionsParams",
"{",
"}",
"\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 UpdateIsoPermissionsParams instance,
// as then you are sure you have configured all required params
|
[
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"UpdateIsoPermissionsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] |
b6f53ed3282d22b6446422879587b0a78e1b0f11
|
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/ISOService.go#L1797-L1802
|
145,273 |
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
|
145,274 |
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
|
145,275 |
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
|
145,276 |
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
|
145,277 |
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
|
145,278 |
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
|
145,279 |
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
|
145,280 |
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
|
145,281 |
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
|
145,282 |
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
|
145,283 |
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
|
145,284 |
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
|
145,285 |
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
|
145,286 |
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
|
145,287 |
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
|
145,288 |
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
|
145,289 |
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
|
145,290 |
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
|
145,291 |
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
|
145,292 |
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
|
145,293 |
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
|
145,294 |
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
|
145,295 |
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
|
145,296 |
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
|
145,297 |
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
|
145,298 |
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
|
145,299 |
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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.