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
sequence | docstring
stringlengths 6
2.61k
| docstring_tokens
sequence | sha
stringlengths 40
40
| url
stringlengths 85
252
|
---|---|---|---|---|---|---|---|---|---|---|---|
6,600 | softlayer/softlayer-go | services/virtual.go | GetPciDeviceAllocationStatus | func (r Virtual_DedicatedHost) GetPciDeviceAllocationStatus() (resp datatypes.Container_Virtual_DedicatedHost_Pci_Device_AllocationStatus, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getPciDeviceAllocationStatus", nil, &r.Options, &resp)
return
} | go | func (r Virtual_DedicatedHost) GetPciDeviceAllocationStatus() (resp datatypes.Container_Virtual_DedicatedHost_Pci_Device_AllocationStatus, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getPciDeviceAllocationStatus", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_DedicatedHost",
")",
"GetPciDeviceAllocationStatus",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Container_Virtual_DedicatedHost_Pci_Device_AllocationStatus",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The container that represents PCI device allocations on the dedicated host. | [
"Retrieve",
"The",
"container",
"that",
"represents",
"PCI",
"device",
"allocations",
"on",
"the",
"dedicated",
"host",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L145-L148 |
6,601 | softlayer/softlayer-go | services/virtual.go | GetPciDevices | func (r Virtual_DedicatedHost) GetPciDevices() (resp []datatypes.Virtual_Host_PciDevice, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getPciDevices", nil, &r.Options, &resp)
return
} | go | func (r Virtual_DedicatedHost) GetPciDevices() (resp []datatypes.Virtual_Host_PciDevice, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getPciDevices", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_DedicatedHost",
")",
"GetPciDevices",
"(",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Virtual_Host_PciDevice",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve A collection of SoftLayer_Virtual_Host_PciDevice objects on the host. | [
"Retrieve",
"A",
"collection",
"of",
"SoftLayer_Virtual_Host_PciDevice",
"objects",
"on",
"the",
"host",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L151-L154 |
6,602 | softlayer/softlayer-go | services/virtual.go | GetBillingItem | func (r Virtual_Disk_Image) GetBillingItem() (resp datatypes.Billing_Item_Virtual_Disk_Image, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getBillingItem", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Disk_Image) GetBillingItem() (resp datatypes.Billing_Item_Virtual_Disk_Image, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getBillingItem", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Disk_Image",
")",
"GetBillingItem",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Billing_Item_Virtual_Disk_Image",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The billing item for a virtual disk image. | [
"Retrieve",
"The",
"billing",
"item",
"for",
"a",
"virtual",
"disk",
"image",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L229-L232 |
6,603 | softlayer/softlayer-go | services/virtual.go | GetBlockDevices | func (r Virtual_Disk_Image) GetBlockDevices() (resp []datatypes.Virtual_Guest_Block_Device, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getBlockDevices", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Disk_Image) GetBlockDevices() (resp []datatypes.Virtual_Guest_Block_Device, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getBlockDevices", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Disk_Image",
")",
"GetBlockDevices",
"(",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Virtual_Guest_Block_Device",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The block devices that a disk image is attached to. Block devices connect computing instances to disk images. | [
"Retrieve",
"The",
"block",
"devices",
"that",
"a",
"disk",
"image",
"is",
"attached",
"to",
".",
"Block",
"devices",
"connect",
"computing",
"instances",
"to",
"disk",
"images",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L235-L238 |
6,604 | softlayer/softlayer-go | services/virtual.go | GetImportedDiskType | func (r Virtual_Disk_Image) GetImportedDiskType() (resp string, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getImportedDiskType", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Disk_Image) GetImportedDiskType() (resp string, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getImportedDiskType", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Disk_Image",
")",
"GetImportedDiskType",
"(",
")",
"(",
"resp",
"string",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve Return imported disk type | [
"Retrieve",
"Return",
"imported",
"disk",
"type"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L259-L262 |
6,605 | softlayer/softlayer-go | services/virtual.go | GetSoftwareReferences | func (r Virtual_Disk_Image) GetSoftwareReferences() (resp []datatypes.Virtual_Disk_Image_Software, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getSoftwareReferences", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Disk_Image) GetSoftwareReferences() (resp []datatypes.Virtual_Disk_Image_Software, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getSoftwareReferences", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Disk_Image",
")",
"GetSoftwareReferences",
"(",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Virtual_Disk_Image_Software",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve References to the software that resides on a disk image. | [
"Retrieve",
"References",
"to",
"the",
"software",
"that",
"resides",
"on",
"a",
"disk",
"image",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L295-L298 |
6,606 | softlayer/softlayer-go | services/virtual.go | GetStorageRepositoryType | func (r Virtual_Disk_Image) GetStorageRepositoryType() (resp datatypes.Virtual_Storage_Repository_Type, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getStorageRepositoryType", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Disk_Image) GetStorageRepositoryType() (resp datatypes.Virtual_Storage_Repository_Type, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getStorageRepositoryType", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Disk_Image",
")",
"GetStorageRepositoryType",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Storage_Repository_Type",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The type of storage repository that a disk image resides in. | [
"Retrieve",
"The",
"type",
"of",
"storage",
"repository",
"that",
"a",
"disk",
"image",
"resides",
"in",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L313-L316 |
6,607 | softlayer/softlayer-go | services/virtual.go | GetType | func (r Virtual_Disk_Image) GetType() (resp datatypes.Virtual_Disk_Image_Type, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getType", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Disk_Image) GetType() (resp datatypes.Virtual_Disk_Image_Type, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getType", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Disk_Image",
")",
"GetType",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Disk_Image_Type",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve A virtual disk image's type. | [
"Retrieve",
"A",
"virtual",
"disk",
"image",
"s",
"type",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L325-L328 |
6,608 | softlayer/softlayer-go | services/virtual.go | CaptureImage | func (r Virtual_Guest) CaptureImage(captureTemplate *datatypes.Container_Disk_Image_Capture_Template) (resp datatypes.Virtual_Guest_Block_Device_Template_Group, err error) {
params := []interface{}{
captureTemplate,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "captureImage", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) CaptureImage(captureTemplate *datatypes.Container_Disk_Image_Capture_Template) (resp datatypes.Virtual_Guest_Block_Device_Template_Group, err error) {
params := []interface{}{
captureTemplate,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "captureImage", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"CaptureImage",
"(",
"captureTemplate",
"*",
"datatypes",
".",
"Container_Disk_Image_Capture_Template",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Guest_Block_Device_Template_Group",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"captureTemplate",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Captures a Flex Image of the hard disk on the virtual machine, based on the capture template parameter. Returns the image template group containing the disk image. | [
"Captures",
"a",
"Flex",
"Image",
"of",
"the",
"hard",
"disk",
"on",
"the",
"virtual",
"machine",
"based",
"on",
"the",
"capture",
"template",
"parameter",
".",
"Returns",
"the",
"image",
"template",
"group",
"containing",
"the",
"disk",
"image",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L421-L427 |
6,609 | softlayer/softlayer-go | services/virtual.go | CloseAlarm | func (r Virtual_Guest) CloseAlarm(alarmId *string) (resp bool, err error) {
params := []interface{}{
alarmId,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "closeAlarm", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) CloseAlarm(alarmId *string) (resp bool, err error) {
params := []interface{}{
alarmId,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "closeAlarm", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"CloseAlarm",
"(",
"alarmId",
"*",
"string",
")",
"(",
"resp",
"bool",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"alarmId",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Returns monitoring alarm detailed history | [
"Returns",
"monitoring",
"alarm",
"detailed",
"history"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L439-L445 |
6,610 | softlayer/softlayer-go | services/virtual.go | CreateArchiveTransaction | func (r Virtual_Guest) CreateArchiveTransaction(groupName *string, blockDevices []datatypes.Virtual_Guest_Block_Device, note *string) (resp datatypes.Provisioning_Version1_Transaction, err error) {
params := []interface{}{
groupName,
blockDevices,
note,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "createArchiveTransaction", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) CreateArchiveTransaction(groupName *string, blockDevices []datatypes.Virtual_Guest_Block_Device, note *string) (resp datatypes.Provisioning_Version1_Transaction, err error) {
params := []interface{}{
groupName,
blockDevices,
note,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "createArchiveTransaction", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"CreateArchiveTransaction",
"(",
"groupName",
"*",
"string",
",",
"blockDevices",
"[",
"]",
"datatypes",
".",
"Virtual_Guest_Block_Device",
",",
"note",
"*",
"string",
")",
"(",
"resp",
"datatypes",
".",
"Provisioning_Version1_Transaction",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"groupName",
",",
"blockDevices",
",",
"note",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Create a transaction to archive a computing instance's block devices | [
"Create",
"a",
"transaction",
"to",
"archive",
"a",
"computing",
"instance",
"s",
"block",
"devices"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L456-L464 |
6,611 | softlayer/softlayer-go | services/virtual.go | GetAdditionalRequiredPricesForOsReload | func (r Virtual_Guest) GetAdditionalRequiredPricesForOsReload(config *datatypes.Container_Hardware_Server_Configuration) (resp []datatypes.Product_Item_Price, err error) {
params := []interface{}{
config,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAdditionalRequiredPricesForOsReload", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetAdditionalRequiredPricesForOsReload(config *datatypes.Container_Hardware_Server_Configuration) (resp []datatypes.Product_Item_Price, err error) {
params := []interface{}{
config,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAdditionalRequiredPricesForOsReload", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetAdditionalRequiredPricesForOsReload",
"(",
"config",
"*",
"datatypes",
".",
"Container_Hardware_Server_Configuration",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Product_Item_Price",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"config",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Return a collection of SoftLayer_Item_Price objects for an OS reload | [
"Return",
"a",
"collection",
"of",
"SoftLayer_Item_Price",
"objects",
"for",
"an",
"OS",
"reload"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1034-L1040 |
6,612 | softlayer/softlayer-go | services/virtual.go | GetAllowedHost | func (r Virtual_Guest) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedHost", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedHost", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetAllowedHost",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Network_Storage_Allowed_Host",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this Virtual Guest to Network Storage volumes that require access control lists. | [
"Retrieve",
"The",
"SoftLayer_Network_Storage_Allowed_Host",
"information",
"to",
"connect",
"this",
"Virtual",
"Guest",
"to",
"Network",
"Storage",
"volumes",
"that",
"require",
"access",
"control",
"lists",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1054-L1057 |
6,613 | softlayer/softlayer-go | services/virtual.go | GetBandwidthDataByDate | func (r Virtual_Guest) GetBandwidthDataByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time, networkType *string) (resp []datatypes.Metric_Tracking_Object_Data, err error) {
params := []interface{}{
startDateTime,
endDateTime,
networkType,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBandwidthDataByDate", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetBandwidthDataByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time, networkType *string) (resp []datatypes.Metric_Tracking_Object_Data, err error) {
params := []interface{}{
startDateTime,
endDateTime,
networkType,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBandwidthDataByDate", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetBandwidthDataByDate",
"(",
"startDateTime",
"*",
"datatypes",
".",
"Time",
",",
"endDateTime",
"*",
"datatypes",
".",
"Time",
",",
"networkType",
"*",
"string",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Metric_Tracking_Object_Data",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"startDateTime",
",",
"endDateTime",
",",
"networkType",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Use this method when needing the metric data for bandwidth for a single guest. It will gather the correct input parameters based on the date ranges | [
"Use",
"this",
"method",
"when",
"needing",
"the",
"metric",
"data",
"for",
"bandwidth",
"for",
"a",
"single",
"guest",
".",
"It",
"will",
"gather",
"the",
"correct",
"input",
"parameters",
"based",
"on",
"the",
"date",
"ranges"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1156-L1164 |
6,614 | softlayer/softlayer-go | services/virtual.go | GetBillingItem | func (r Virtual_Guest) GetBillingItem() (resp datatypes.Billing_Item_Virtual_Guest, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBillingItem", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetBillingItem() (resp datatypes.Billing_Item_Virtual_Guest, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBillingItem", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetBillingItem",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Billing_Item_Virtual_Guest",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The billing item for a CloudLayer Compute Instance. | [
"Retrieve",
"The",
"billing",
"item",
"for",
"a",
"CloudLayer",
"Compute",
"Instance",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1230-L1233 |
6,615 | softlayer/softlayer-go | services/virtual.go | GetBlockDeviceTemplateGroup | func (r Virtual_Guest) GetBlockDeviceTemplateGroup() (resp datatypes.Virtual_Guest_Block_Device_Template_Group, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBlockDeviceTemplateGroup", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetBlockDeviceTemplateGroup() (resp datatypes.Virtual_Guest_Block_Device_Template_Group, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBlockDeviceTemplateGroup", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetBlockDeviceTemplateGroup",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Guest_Block_Device_Template_Group",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The global identifier for the image template that was used to provision or reload a guest. | [
"Retrieve",
"The",
"global",
"identifier",
"for",
"the",
"image",
"template",
"that",
"was",
"used",
"to",
"provision",
"or",
"reload",
"a",
"guest",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1242-L1245 |
6,616 | softlayer/softlayer-go | services/virtual.go | GetConsoleAccessLog | func (r Virtual_Guest) GetConsoleAccessLog() (resp []datatypes.Network_Logging_Syslog, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleAccessLog", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetConsoleAccessLog() (resp []datatypes.Network_Logging_Syslog, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleAccessLog", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetConsoleAccessLog",
"(",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Network_Logging_Syslog",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Gets the console access logs for a computing instance | [
"Gets",
"the",
"console",
"access",
"logs",
"for",
"a",
"computing",
"instance"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1266-L1269 |
6,617 | softlayer/softlayer-go | services/virtual.go | GetConsoleIpAddressRecord | func (r Virtual_Guest) GetConsoleIpAddressRecord() (resp datatypes.Virtual_Guest_Network_Component_IpAddress, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleIpAddressRecord", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetConsoleIpAddressRecord() (resp datatypes.Virtual_Guest_Network_Component_IpAddress, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleIpAddressRecord", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetConsoleIpAddressRecord",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Guest_Network_Component_IpAddress",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve A record containing information about a computing instance's console IP and port number. | [
"Retrieve",
"A",
"record",
"containing",
"information",
"about",
"a",
"computing",
"instance",
"s",
"console",
"IP",
"and",
"port",
"number",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1278-L1281 |
6,618 | softlayer/softlayer-go | services/virtual.go | GetCpuMetricDataByDate | func (r Virtual_Guest) GetCpuMetricDataByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time, cpuIndexes []int) (resp []datatypes.Metric_Tracking_Object_Data, err error) {
params := []interface{}{
startDateTime,
endDateTime,
cpuIndexes,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCpuMetricDataByDate", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetCpuMetricDataByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time, cpuIndexes []int) (resp []datatypes.Metric_Tracking_Object_Data, err error) {
params := []interface{}{
startDateTime,
endDateTime,
cpuIndexes,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCpuMetricDataByDate", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetCpuMetricDataByDate",
"(",
"startDateTime",
"*",
"datatypes",
".",
"Time",
",",
"endDateTime",
"*",
"datatypes",
".",
"Time",
",",
"cpuIndexes",
"[",
"]",
"int",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Metric_Tracking_Object_Data",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"startDateTime",
",",
"endDateTime",
",",
"cpuIndexes",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Use this method when needing the metric data for a single guest's CPUs. It will gather the correct input parameters based on the date ranges | [
"Use",
"this",
"method",
"when",
"needing",
"the",
"metric",
"data",
"for",
"a",
"single",
"guest",
"s",
"CPUs",
".",
"It",
"will",
"gather",
"the",
"correct",
"input",
"parameters",
"based",
"on",
"the",
"date",
"ranges"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1302-L1310 |
6,619 | softlayer/softlayer-go | services/virtual.go | GetCpuMetricImageByDate | func (r Virtual_Guest) GetCpuMetricImageByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time, cpuIndexes []int) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) {
params := []interface{}{
startDateTime,
endDateTime,
cpuIndexes,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCpuMetricImageByDate", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetCpuMetricImageByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time, cpuIndexes []int) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) {
params := []interface{}{
startDateTime,
endDateTime,
cpuIndexes,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCpuMetricImageByDate", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetCpuMetricImageByDate",
"(",
"startDateTime",
"*",
"datatypes",
".",
"Time",
",",
"endDateTime",
"*",
"datatypes",
".",
"Time",
",",
"cpuIndexes",
"[",
"]",
"int",
")",
"(",
"resp",
"datatypes",
".",
"Container_Bandwidth_GraphOutputs",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"startDateTime",
",",
"endDateTime",
",",
"cpuIndexes",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Use this method when needing a CPU usage image for a single guest. It will gather the correct input parameters for the generic graphing utility based on the date ranges | [
"Use",
"this",
"method",
"when",
"needing",
"a",
"CPU",
"usage",
"image",
"for",
"a",
"single",
"guest",
".",
"It",
"will",
"gather",
"the",
"correct",
"input",
"parameters",
"for",
"the",
"generic",
"graphing",
"utility",
"based",
"on",
"the",
"date",
"ranges"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1323-L1331 |
6,620 | softlayer/softlayer-go | services/virtual.go | GetCurrentBandwidthSummary | func (r Virtual_Guest) GetCurrentBandwidthSummary() (resp datatypes.Metric_Tracking_Object_Bandwidth_Summary, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCurrentBandwidthSummary", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetCurrentBandwidthSummary() (resp datatypes.Metric_Tracking_Object_Bandwidth_Summary, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCurrentBandwidthSummary", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetCurrentBandwidthSummary",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Metric_Tracking_Object_Bandwidth_Summary",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve An object that provides commonly used bandwidth summary components for the current billing cycle. | [
"Retrieve",
"An",
"object",
"that",
"provides",
"commonly",
"used",
"bandwidth",
"summary",
"components",
"for",
"the",
"current",
"billing",
"cycle",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1344-L1347 |
6,621 | softlayer/softlayer-go | services/virtual.go | GetLastKnownPowerState | func (r Virtual_Guest) GetLastKnownPowerState() (resp datatypes.Virtual_Guest_Power_State, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getLastKnownPowerState", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetLastKnownPowerState() (resp datatypes.Virtual_Guest_Power_State, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getLastKnownPowerState", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetLastKnownPowerState",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Guest_Power_State",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The last known power state of a virtual guest in the event the guest is turned off outside of IMS or has gone offline. | [
"Retrieve",
"The",
"last",
"known",
"power",
"state",
"of",
"a",
"virtual",
"guest",
"in",
"the",
"event",
"the",
"guest",
"is",
"turned",
"off",
"outside",
"of",
"IMS",
"or",
"has",
"gone",
"offline",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1499-L1502 |
6,622 | softlayer/softlayer-go | services/virtual.go | GetMemoryMetricDataByDate | func (r Virtual_Guest) GetMemoryMetricDataByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) {
params := []interface{}{
startDateTime,
endDateTime,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMemoryMetricDataByDate", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetMemoryMetricDataByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) {
params := []interface{}{
startDateTime,
endDateTime,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMemoryMetricDataByDate", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetMemoryMetricDataByDate",
"(",
"startDateTime",
"*",
"datatypes",
".",
"Time",
",",
"endDateTime",
"*",
"datatypes",
".",
"Time",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Metric_Tracking_Object_Data",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"startDateTime",
",",
"endDateTime",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Use this method when needing the metric data for memory for a single computing instance. | [
"Use",
"this",
"method",
"when",
"needing",
"the",
"metric",
"data",
"for",
"memory",
"for",
"a",
"single",
"computing",
"instance",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1541-L1548 |
6,623 | softlayer/softlayer-go | services/virtual.go | GetMemoryMetricImage | func (r Virtual_Guest) GetMemoryMetricImage(snapshotRange *string, dateSpecified *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) {
params := []interface{}{
snapshotRange,
dateSpecified,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMemoryMetricImage", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetMemoryMetricImage(snapshotRange *string, dateSpecified *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) {
params := []interface{}{
snapshotRange,
dateSpecified,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMemoryMetricImage", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetMemoryMetricImage",
"(",
"snapshotRange",
"*",
"string",
",",
"dateSpecified",
"*",
"datatypes",
".",
"Time",
")",
"(",
"resp",
"datatypes",
".",
"Container_Bandwidth_GraphOutputs",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"snapshotRange",
",",
"dateSpecified",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Use this method when needing a memory usage image for a single guest. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. | [
"Use",
"this",
"method",
"when",
"needing",
"a",
"memory",
"usage",
"image",
"for",
"a",
"single",
"guest",
".",
"It",
"will",
"gather",
"the",
"correct",
"input",
"parameters",
"for",
"the",
"generic",
"graphing",
"utility",
"automatically",
"based",
"on",
"the",
"snapshot",
"specified",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1551-L1558 |
6,624 | softlayer/softlayer-go | services/virtual.go | GetMemoryMetricImageByDate | func (r Virtual_Guest) GetMemoryMetricImageByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) {
params := []interface{}{
startDateTime,
endDateTime,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMemoryMetricImageByDate", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetMemoryMetricImageByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) {
params := []interface{}{
startDateTime,
endDateTime,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMemoryMetricImageByDate", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetMemoryMetricImageByDate",
"(",
"startDateTime",
"*",
"datatypes",
".",
"Time",
",",
"endDateTime",
"*",
"datatypes",
".",
"Time",
")",
"(",
"resp",
"datatypes",
".",
"Container_Bandwidth_GraphOutputs",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"startDateTime",
",",
"endDateTime",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Use this method when needing a image displaying the amount of memory used over time for a single computing instance. It will gather the correct input parameters for the generic graphing utility based on the date ranges | [
"Use",
"this",
"method",
"when",
"needing",
"a",
"image",
"displaying",
"the",
"amount",
"of",
"memory",
"used",
"over",
"time",
"for",
"a",
"single",
"computing",
"instance",
".",
"It",
"will",
"gather",
"the",
"correct",
"input",
"parameters",
"for",
"the",
"generic",
"graphing",
"utility",
"based",
"on",
"the",
"date",
"ranges"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1561-L1568 |
6,625 | softlayer/softlayer-go | services/virtual.go | GetOperatingSystem | func (r Virtual_Guest) GetOperatingSystem() (resp datatypes.Software_Component_OperatingSystem, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getOperatingSystem", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetOperatingSystem() (resp datatypes.Software_Component_OperatingSystem, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getOperatingSystem", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetOperatingSystem",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Software_Component_OperatingSystem",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve A guest's operating system. | [
"Retrieve",
"A",
"guest",
"s",
"operating",
"system",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1687-L1690 |
6,626 | softlayer/softlayer-go | services/virtual.go | GetRecentMetricData | func (r Virtual_Guest) GetRecentMetricData(time *uint) (resp []datatypes.Metric_Tracking_Object, err error) {
params := []interface{}{
time,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRecentMetricData", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetRecentMetricData(time *uint) (resp []datatypes.Metric_Tracking_Object, err error) {
params := []interface{}{
time,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRecentMetricData", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetRecentMetricData",
"(",
"time",
"*",
"uint",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Metric_Tracking_Object",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"time",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Recent metric data for a guest | [
"Recent",
"metric",
"data",
"for",
"a",
"guest"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1805-L1811 |
6,627 | softlayer/softlayer-go | services/virtual.go | GetRegionalGroup | func (r Virtual_Guest) GetRegionalGroup() (resp datatypes.Location_Group_Regional, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRegionalGroup", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetRegionalGroup() (resp datatypes.Location_Group_Regional, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRegionalGroup", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetRegionalGroup",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Location_Group_Regional",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The regional group this guest is in. | [
"Retrieve",
"The",
"regional",
"group",
"this",
"guest",
"is",
"in",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1814-L1817 |
6,628 | softlayer/softlayer-go | services/virtual.go | GetStatus | func (r Virtual_Guest) GetStatus() (resp datatypes.Virtual_Guest_Status, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getStatus", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetStatus() (resp datatypes.Virtual_Guest_Status, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getStatus", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetStatus",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Guest_Status",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve A computing instance's status. | [
"Retrieve",
"A",
"computing",
"instance",
"s",
"status",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1916-L1919 |
6,629 | softlayer/softlayer-go | services/virtual.go | GetType | func (r Virtual_Guest) GetType() (resp datatypes.Virtual_Guest_Type, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getType", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetType() (resp datatypes.Virtual_Guest_Type, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getType", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetType",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Guest_Type",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The type of this virtual guest. | [
"Retrieve",
"The",
"type",
"of",
"this",
"virtual",
"guest",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1940-L1943 |
6,630 | softlayer/softlayer-go | services/virtual.go | GetUserData | func (r Virtual_Guest) GetUserData() (resp []datatypes.Virtual_Guest_Attribute, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUserData", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetUserData() (resp []datatypes.Virtual_Guest_Attribute, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUserData", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetUserData",
"(",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Virtual_Guest_Attribute",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve A base64 encoded string containing custom user data for a Cloud Computing Instance order. | [
"Retrieve",
"A",
"base64",
"encoded",
"string",
"containing",
"custom",
"user",
"data",
"for",
"a",
"Cloud",
"Computing",
"Instance",
"order",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1963-L1966 |
6,631 | softlayer/softlayer-go | services/virtual.go | GetValidBlockDeviceTemplateGroups | func (r Virtual_Guest) GetValidBlockDeviceTemplateGroups(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) {
params := []interface{}{
visibility,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getValidBlockDeviceTemplateGroups", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) GetValidBlockDeviceTemplateGroups(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) {
params := []interface{}{
visibility,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getValidBlockDeviceTemplateGroups", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"GetValidBlockDeviceTemplateGroups",
"(",
"visibility",
"*",
"string",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Virtual_Guest_Block_Device_Template_Group",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"visibility",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // This method will return the list of block device template groups that are valid to the host. For instance, it will validate that the template groups returned are compatible with the size and number of disks on the host. | [
"This",
"method",
"will",
"return",
"the",
"list",
"of",
"block",
"device",
"template",
"groups",
"that",
"are",
"valid",
"to",
"the",
"host",
".",
"For",
"instance",
"it",
"will",
"validate",
"that",
"the",
"template",
"groups",
"returned",
"are",
"compatible",
"with",
"the",
"size",
"and",
"number",
"of",
"disks",
"on",
"the",
"host",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L1975-L1981 |
6,632 | softlayer/softlayer-go | services/virtual.go | MigrateDedicatedHost | func (r Virtual_Guest) MigrateDedicatedHost(destinationHostId *int) (err error) {
var resp datatypes.Void
params := []interface{}{
destinationHostId,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "migrateDedicatedHost", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) MigrateDedicatedHost(destinationHostId *int) (err error) {
var resp datatypes.Void
params := []interface{}{
destinationHostId,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "migrateDedicatedHost", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"MigrateDedicatedHost",
"(",
"destinationHostId",
"*",
"int",
")",
"(",
"err",
"error",
")",
"{",
"var",
"resp",
"datatypes",
".",
"Void",
"\n",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"destinationHostId",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Create a transaction to migrate an instance from one dedicated host to another dedicated host | [
"Create",
"a",
"transaction",
"to",
"migrate",
"an",
"instance",
"from",
"one",
"dedicated",
"host",
"to",
"another",
"dedicated",
"host"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2027-L2034 |
6,633 | softlayer/softlayer-go | services/virtual.go | ValidateImageTemplate | func (r Virtual_Guest) ValidateImageTemplate(imageTemplateId *int) (resp bool, err error) {
params := []interface{}{
imageTemplateId,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "validateImageTemplate", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) ValidateImageTemplate(imageTemplateId *int) (resp bool, err error) {
params := []interface{}{
imageTemplateId,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "validateImageTemplate", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"ValidateImageTemplate",
"(",
"imageTemplateId",
"*",
"int",
")",
"(",
"resp",
"bool",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"imageTemplateId",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Validate an image template for OS Reload | [
"Validate",
"an",
"image",
"template",
"for",
"OS",
"Reload"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2225-L2231 |
6,634 | softlayer/softlayer-go | services/virtual.go | VerifyReloadOperatingSystem | func (r Virtual_Guest) VerifyReloadOperatingSystem(config *datatypes.Container_Hardware_Server_Configuration) (resp bool, err error) {
params := []interface{}{
config,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "verifyReloadOperatingSystem", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest) VerifyReloadOperatingSystem(config *datatypes.Container_Hardware_Server_Configuration) (resp bool, err error) {
params := []interface{}{
config,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "verifyReloadOperatingSystem", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest",
")",
"VerifyReloadOperatingSystem",
"(",
"config",
"*",
"datatypes",
".",
"Container_Hardware_Server_Configuration",
")",
"(",
"resp",
"bool",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"config",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Verify that a virtual server can go through the operating system reload process. It may be useful to call this method before attempting to actually reload the operating system just to verify that the reload will go smoothly. If the server configuration is not setup correctly or there is some other issue, an exception will be thrown indicating the error. If there were no issues, this will just return true. | [
"Verify",
"that",
"a",
"virtual",
"server",
"can",
"go",
"through",
"the",
"operating",
"system",
"reload",
"process",
".",
"It",
"may",
"be",
"useful",
"to",
"call",
"this",
"method",
"before",
"attempting",
"to",
"actually",
"reload",
"the",
"operating",
"system",
"just",
"to",
"verify",
"that",
"the",
"reload",
"will",
"go",
"smoothly",
".",
"If",
"the",
"server",
"configuration",
"is",
"not",
"setup",
"correctly",
"or",
"there",
"is",
"some",
"other",
"issue",
"an",
"exception",
"will",
"be",
"thrown",
"indicating",
"the",
"error",
".",
"If",
"there",
"were",
"no",
"issues",
"this",
"will",
"just",
"return",
"true",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2234-L2240 |
6,635 | softlayer/softlayer-go | services/virtual.go | AddSupportedBootMode | func (r Virtual_Guest_Block_Device_Template_Group) AddSupportedBootMode(bootMode *string) (resp bool, err error) {
params := []interface{}{
bootMode,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "addSupportedBootMode", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) AddSupportedBootMode(bootMode *string) (resp bool, err error) {
params := []interface{}{
bootMode,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "addSupportedBootMode", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"AddSupportedBootMode",
"(",
"bootMode",
"*",
"string",
")",
"(",
"resp",
"bool",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"bootMode",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // This method allows you to mark this image's supported boot modes as 'HVM' or 'PV'. | [
"This",
"method",
"allows",
"you",
"to",
"mark",
"this",
"image",
"s",
"supported",
"boot",
"modes",
"as",
"HVM",
"or",
"PV",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2306-L2312 |
6,636 | softlayer/softlayer-go | services/virtual.go | CreateFromIcos | func (r Virtual_Guest_Block_Device_Template_Group) CreateFromIcos(configuration *datatypes.Container_Virtual_Guest_Block_Device_Template_Configuration) (resp datatypes.Virtual_Guest_Block_Device_Template_Group, err error) {
params := []interface{}{
configuration,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "createFromIcos", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) CreateFromIcos(configuration *datatypes.Container_Virtual_Guest_Block_Device_Template_Configuration) (resp datatypes.Virtual_Guest_Block_Device_Template_Group, err error) {
params := []interface{}{
configuration,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "createFromIcos", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"CreateFromIcos",
"(",
"configuration",
"*",
"datatypes",
".",
"Container_Virtual_Guest_Block_Device_Template_Configuration",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Guest_Block_Device_Template_Group",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"configuration",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Create a process to import a disk image from ICOS and create a standard | [
"Create",
"a",
"process",
"to",
"import",
"a",
"disk",
"image",
"from",
"ICOS",
"and",
"create",
"a",
"standard"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2342-L2348 |
6,637 | softlayer/softlayer-go | services/virtual.go | CreatePublicArchiveTransaction | func (r Virtual_Guest_Block_Device_Template_Group) CreatePublicArchiveTransaction(groupName *string, summary *string, note *string, locations []datatypes.Location) (resp int, err error) {
params := []interface{}{
groupName,
summary,
note,
locations,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "createPublicArchiveTransaction", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) CreatePublicArchiveTransaction(groupName *string, summary *string, note *string, locations []datatypes.Location) (resp int, err error) {
params := []interface{}{
groupName,
summary,
note,
locations,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "createPublicArchiveTransaction", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"CreatePublicArchiveTransaction",
"(",
"groupName",
"*",
"string",
",",
"summary",
"*",
"string",
",",
"note",
"*",
"string",
",",
"locations",
"[",
"]",
"datatypes",
".",
"Location",
")",
"(",
"resp",
"int",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"groupName",
",",
"summary",
",",
"note",
",",
"locations",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Create a transaction to copy archived block devices into public repository | [
"Create",
"a",
"transaction",
"to",
"copy",
"archived",
"block",
"devices",
"into",
"public",
"repository"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2351-L2360 |
6,638 | softlayer/softlayer-go | services/virtual.go | FindGcImagesByCurrentUser | func (r Virtual_Guest_Block_Device_Template_Group) FindGcImagesByCurrentUser(dataCenters []string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) {
params := []interface{}{
dataCenters,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "findGcImagesByCurrentUser", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) FindGcImagesByCurrentUser(dataCenters []string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) {
params := []interface{}{
dataCenters,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "findGcImagesByCurrentUser", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"FindGcImagesByCurrentUser",
"(",
"dataCenters",
"[",
"]",
"string",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Virtual_Guest_Block_Device_Template_Group",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"dataCenters",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Find block device template groups containing a GC enabled image for the current active user. A sorted collection of groups is returned. The Caller can optionally specify data center names to retrieve GC images only from those data centers. | [
"Find",
"block",
"device",
"template",
"groups",
"containing",
"a",
"GC",
"enabled",
"image",
"for",
"the",
"current",
"active",
"user",
".",
"A",
"sorted",
"collection",
"of",
"groups",
"is",
"returned",
".",
"The",
"Caller",
"can",
"optionally",
"specify",
"data",
"center",
"names",
"to",
"retrieve",
"GC",
"images",
"only",
"from",
"those",
"data",
"centers",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2399-L2405 |
6,639 | softlayer/softlayer-go | services/virtual.go | GetAccountReferences | func (r Virtual_Guest_Block_Device_Template_Group) GetAccountReferences() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group_Accounts, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccountReferences", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) GetAccountReferences() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group_Accounts, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccountReferences", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"GetAccountReferences",
"(",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Virtual_Guest_Block_Device_Template_Group_Accounts",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The accounts which may have read-only access to an image template group. Will only be populated for parent template group objects. | [
"Retrieve",
"The",
"accounts",
"which",
"may",
"have",
"read",
"-",
"only",
"access",
"to",
"an",
"image",
"template",
"group",
".",
"Will",
"only",
"be",
"populated",
"for",
"parent",
"template",
"group",
"objects",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2420-L2423 |
6,640 | softlayer/softlayer-go | services/virtual.go | GetBlockDevices | func (r Virtual_Guest_Block_Device_Template_Group) GetBlockDevices() (resp []datatypes.Virtual_Guest_Block_Device_Template, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getBlockDevices", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) GetBlockDevices() (resp []datatypes.Virtual_Guest_Block_Device_Template, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getBlockDevices", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"GetBlockDevices",
"(",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Virtual_Guest_Block_Device_Template",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The block devices that are part of an image template group | [
"Retrieve",
"The",
"block",
"devices",
"that",
"are",
"part",
"of",
"an",
"image",
"template",
"group"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2432-L2435 |
6,641 | softlayer/softlayer-go | services/virtual.go | GetBlockDevicesDiskSpaceTotal | func (r Virtual_Guest_Block_Device_Template_Group) GetBlockDevicesDiskSpaceTotal() (resp datatypes.Float64, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getBlockDevicesDiskSpaceTotal", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) GetBlockDevicesDiskSpaceTotal() (resp datatypes.Float64, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getBlockDevicesDiskSpaceTotal", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"GetBlockDevicesDiskSpaceTotal",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Float64",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The total disk space of all images in a image template group. | [
"Retrieve",
"The",
"total",
"disk",
"space",
"of",
"all",
"images",
"in",
"a",
"image",
"template",
"group",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2438-L2441 |
6,642 | softlayer/softlayer-go | services/virtual.go | GetImageType | func (r Virtual_Guest_Block_Device_Template_Group) GetImageType() (resp datatypes.Virtual_Disk_Image_Type, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getImageType", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) GetImageType() (resp datatypes.Virtual_Disk_Image_Type, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getImageType", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"GetImageType",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Disk_Image_Type",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The virtual disk image type of this template. Value will be populated on parent and child, but only supports object filtering on the parent. | [
"Retrieve",
"The",
"virtual",
"disk",
"image",
"type",
"of",
"this",
"template",
".",
"Value",
"will",
"be",
"populated",
"on",
"parent",
"and",
"child",
"but",
"only",
"supports",
"object",
"filtering",
"on",
"the",
"parent",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2504-L2507 |
6,643 | softlayer/softlayer-go | services/virtual.go | GetStatus | func (r Virtual_Guest_Block_Device_Template_Group) GetStatus() (resp datatypes.Virtual_Guest_Block_Device_Template_Group_Status, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStatus", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) GetStatus() (resp datatypes.Virtual_Guest_Block_Device_Template_Group_Status, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStatus", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"GetStatus",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Guest_Block_Device_Template_Group_Status",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve A template group's status. | [
"Retrieve",
"A",
"template",
"group",
"s",
"status",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2546-L2549 |
6,644 | softlayer/softlayer-go | services/virtual.go | GetStorageRepository | func (r Virtual_Guest_Block_Device_Template_Group) GetStorageRepository() (resp datatypes.Virtual_Storage_Repository, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStorageRepository", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) GetStorageRepository() (resp datatypes.Virtual_Storage_Repository, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStorageRepository", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"GetStorageRepository",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Storage_Repository",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The storage repository that an image template group resides on. | [
"Retrieve",
"The",
"storage",
"repository",
"that",
"an",
"image",
"template",
"group",
"resides",
"on",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2558-L2561 |
6,645 | softlayer/softlayer-go | services/virtual.go | GetTransaction | func (r Virtual_Guest_Block_Device_Template_Group) GetTransaction() (resp datatypes.Provisioning_Version1_Transaction, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getTransaction", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) GetTransaction() (resp datatypes.Provisioning_Version1_Transaction, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getTransaction", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"GetTransaction",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Provisioning_Version1_Transaction",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve A transaction that is being performed on a image template group. | [
"Retrieve",
"A",
"transaction",
"that",
"is",
"being",
"performed",
"on",
"a",
"image",
"template",
"group",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2576-L2579 |
6,646 | softlayer/softlayer-go | services/virtual.go | GetVhdImportSoftwareDescriptions | func (r Virtual_Guest_Block_Device_Template_Group) GetVhdImportSoftwareDescriptions() (resp []datatypes.Software_Description, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getVhdImportSoftwareDescriptions", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) GetVhdImportSoftwareDescriptions() (resp []datatypes.Software_Description, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getVhdImportSoftwareDescriptions", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"GetVhdImportSoftwareDescriptions",
"(",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Software_Description",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Returns an array of SoftLayer_Software_Description that are supported for VHD imports. | [
"Returns",
"an",
"array",
"of",
"SoftLayer_Software_Description",
"that",
"are",
"supported",
"for",
"VHD",
"imports",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2582-L2585 |
6,647 | softlayer/softlayer-go | services/virtual.go | IsByolOnlyOperatingSystem | func (r Virtual_Guest_Block_Device_Template_Group) IsByolOnlyOperatingSystem() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "isByolOnlyOperatingSystem", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) IsByolOnlyOperatingSystem() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "isByolOnlyOperatingSystem", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"IsByolOnlyOperatingSystem",
"(",
")",
"(",
"resp",
"bool",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // This method indicates whether or not this image uses an operating system that requires using a customer supplied license image | [
"This",
"method",
"indicates",
"whether",
"or",
"not",
"this",
"image",
"uses",
"an",
"operating",
"system",
"that",
"requires",
"using",
"a",
"customer",
"supplied",
"license",
"image"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2600-L2603 |
6,648 | softlayer/softlayer-go | services/virtual.go | PermitSharingAccess | func (r Virtual_Guest_Block_Device_Template_Group) PermitSharingAccess(accountId *int) (resp bool, err error) {
params := []interface{}{
accountId,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "permitSharingAccess", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) PermitSharingAccess(accountId *int) (resp bool, err error) {
params := []interface{}{
accountId,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "permitSharingAccess", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"PermitSharingAccess",
"(",
"accountId",
"*",
"int",
")",
"(",
"resp",
"bool",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"accountId",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // This method will permit another SoftLayer customer account access to provision CloudLayer Computing Instances from an image template group. Template access should only be given to the parent template group object, not the child. | [
"This",
"method",
"will",
"permit",
"another",
"SoftLayer",
"customer",
"account",
"access",
"to",
"provision",
"CloudLayer",
"Computing",
"Instances",
"from",
"an",
"image",
"template",
"group",
".",
"Template",
"access",
"should",
"only",
"be",
"given",
"to",
"the",
"parent",
"template",
"group",
"object",
"not",
"the",
"child",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2624-L2630 |
6,649 | softlayer/softlayer-go | services/virtual.go | SetBootMode | func (r Virtual_Guest_Block_Device_Template_Group) SetBootMode(newBootMode *string) (resp bool, err error) {
params := []interface{}{
newBootMode,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "setBootMode", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) SetBootMode(newBootMode *string) (resp bool, err error) {
params := []interface{}{
newBootMode,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "setBootMode", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"SetBootMode",
"(",
"newBootMode",
"*",
"string",
")",
"(",
"resp",
"bool",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"newBootMode",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // This method allows you to specify the boot mode for a given image template. | [
"This",
"method",
"allows",
"you",
"to",
"specify",
"the",
"boot",
"mode",
"for",
"a",
"given",
"image",
"template",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2660-L2666 |
6,650 | softlayer/softlayer-go | services/virtual.go | SetCompatiblePlatforms | func (r Virtual_Guest_Block_Device_Template_Group) SetCompatiblePlatforms(platformNames []string) (resp bool, err error) {
params := []interface{}{
platformNames,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "setCompatiblePlatforms", params, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Block_Device_Template_Group) SetCompatiblePlatforms(platformNames []string) (resp bool, err error) {
params := []interface{}{
platformNames,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "setCompatiblePlatforms", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Block_Device_Template_Group",
")",
"SetCompatiblePlatforms",
"(",
"platformNames",
"[",
"]",
"string",
")",
"(",
"resp",
"bool",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"platformNames",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Sets compatible platforms on the template group. | [
"Sets",
"compatible",
"platforms",
"on",
"the",
"template",
"group",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2669-L2675 |
6,651 | softlayer/softlayer-go | services/virtual.go | GetIpAddressBindings | func (r Virtual_Guest_Network_Component) GetIpAddressBindings() (resp []datatypes.Virtual_Guest_Network_Component_IpAddress, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getIpAddressBindings", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Network_Component) GetIpAddressBindings() (resp []datatypes.Virtual_Guest_Network_Component_IpAddress, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getIpAddressBindings", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Network_Component",
")",
"GetIpAddressBindings",
"(",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Virtual_Guest_Network_Component_IpAddress",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The records of all IP addresses bound to a computing instance's network component. | [
"Retrieve",
"The",
"records",
"of",
"all",
"IP",
"addresses",
"bound",
"to",
"a",
"computing",
"instance",
"s",
"network",
"component",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2893-L2896 |
6,652 | softlayer/softlayer-go | services/virtual.go | GetRouter | func (r Virtual_Guest_Network_Component) GetRouter() (resp datatypes.Hardware_Router, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getRouter", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Network_Component) GetRouter() (resp datatypes.Hardware_Router, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getRouter", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Network_Component",
")",
"GetRouter",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Hardware_Router",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve A network component's routers. | [
"Retrieve",
"A",
"network",
"component",
"s",
"routers",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2941-L2944 |
6,653 | softlayer/softlayer-go | services/virtual.go | GetSecurityGroupBindings | func (r Virtual_Guest_Network_Component) GetSecurityGroupBindings() (resp []datatypes.Virtual_Network_SecurityGroup_NetworkComponentBinding, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getSecurityGroupBindings", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Guest_Network_Component) GetSecurityGroupBindings() (resp []datatypes.Virtual_Network_SecurityGroup_NetworkComponentBinding, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getSecurityGroupBindings", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Guest_Network_Component",
")",
"GetSecurityGroupBindings",
"(",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Virtual_Network_SecurityGroup_NetworkComponentBinding",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The bindings associating security groups to this network component | [
"Retrieve",
"The",
"bindings",
"associating",
"security",
"groups",
"to",
"this",
"network",
"component"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L2947-L2950 |
6,654 | softlayer/softlayer-go | services/virtual.go | GetBilledPerGuestFlag | func (r Virtual_Host) GetBilledPerGuestFlag() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getBilledPerGuestFlag", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Host) GetBilledPerGuestFlag() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getBilledPerGuestFlag", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Host",
")",
"GetBilledPerGuestFlag",
"(",
")",
"(",
"resp",
"bool",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve Boolean flag indicating whether this virtualization platform gets billed per guest rather than at a fixed rate. | [
"Retrieve",
"Boolean",
"flag",
"indicating",
"whether",
"this",
"virtualization",
"platform",
"gets",
"billed",
"per",
"guest",
"rather",
"than",
"at",
"a",
"fixed",
"rate",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3017-L3020 |
6,655 | softlayer/softlayer-go | services/virtual.go | GetGuests | func (r Virtual_Host) GetGuests() (resp []datatypes.Virtual_Guest, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getGuests", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Host) GetGuests() (resp []datatypes.Virtual_Guest, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getGuests", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Host",
")",
"GetGuests",
"(",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Virtual_Guest",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The guests associated with a virtual host. | [
"Retrieve",
"The",
"guests",
"associated",
"with",
"a",
"virtual",
"host",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3029-L3032 |
6,656 | softlayer/softlayer-go | services/virtual.go | GetHardware | func (r Virtual_Host) GetHardware() (resp datatypes.Hardware_Server, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getHardware", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Host) GetHardware() (resp datatypes.Hardware_Server, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getHardware", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Host",
")",
"GetHardware",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Hardware_Server",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The hardware record which a virtual host resides on. | [
"Retrieve",
"The",
"hardware",
"record",
"which",
"a",
"virtual",
"host",
"resides",
"on",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3035-L3038 |
6,657 | softlayer/softlayer-go | services/virtual.go | GetLiveGuestByUuid | func (r Virtual_Host) GetLiveGuestByUuid(uuid *string) (resp datatypes.Virtual_Guest, err error) {
params := []interface{}{
uuid,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getLiveGuestByUuid", params, &r.Options, &resp)
return
} | go | func (r Virtual_Host) GetLiveGuestByUuid(uuid *string) (resp datatypes.Virtual_Guest, err error) {
params := []interface{}{
uuid,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getLiveGuestByUuid", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Host",
")",
"GetLiveGuestByUuid",
"(",
"uuid",
"*",
"string",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_Guest",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"uuid",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Query a virtualization platform directly to retrieve details regarding a guest. | [
"Query",
"a",
"virtualization",
"platform",
"directly",
"to",
"retrieve",
"details",
"regarding",
"a",
"guest",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3041-L3047 |
6,658 | softlayer/softlayer-go | services/virtual.go | GetLiveGuestRecentMetricData | func (r Virtual_Host) GetLiveGuestRecentMetricData(uuid *string, time *int, limit *int, interval *int) (resp []datatypes.Metric_Tracking_Object, err error) {
params := []interface{}{
uuid,
time,
limit,
interval,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getLiveGuestRecentMetricData", params, &r.Options, &resp)
return
} | go | func (r Virtual_Host) GetLiveGuestRecentMetricData(uuid *string, time *int, limit *int, interval *int) (resp []datatypes.Metric_Tracking_Object, err error) {
params := []interface{}{
uuid,
time,
limit,
interval,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getLiveGuestRecentMetricData", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Host",
")",
"GetLiveGuestRecentMetricData",
"(",
"uuid",
"*",
"string",
",",
"time",
"*",
"int",
",",
"limit",
"*",
"int",
",",
"interval",
"*",
"int",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Metric_Tracking_Object",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"uuid",
",",
"time",
",",
"limit",
",",
"interval",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Query a virtualization platform directly to retrieve recent metric data for a guest. | [
"Query",
"a",
"virtualization",
"platform",
"directly",
"to",
"retrieve",
"recent",
"metric",
"data",
"for",
"a",
"guest",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3056-L3065 |
6,659 | softlayer/softlayer-go | services/virtual.go | PauseLiveGuest | func (r Virtual_Host) PauseLiveGuest(uuid *string) (resp bool, err error) {
params := []interface{}{
uuid,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Host", "pauseLiveGuest", params, &r.Options, &resp)
return
} | go | func (r Virtual_Host) PauseLiveGuest(uuid *string) (resp bool, err error) {
params := []interface{}{
uuid,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Host", "pauseLiveGuest", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Host",
")",
"PauseLiveGuest",
"(",
"uuid",
"*",
"string",
")",
"(",
"resp",
"bool",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"uuid",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Pause a virtual guest | [
"Pause",
"a",
"virtual",
"guest"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3086-L3092 |
6,660 | softlayer/softlayer-go | services/virtual.go | GetAvailableRouters | func (r Virtual_PlacementGroup) GetAvailableRouters(datacenterId *int) (resp []datatypes.Hardware, err error) {
params := []interface{}{
datacenterId,
}
err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getAvailableRouters", params, &r.Options, &resp)
return
} | go | func (r Virtual_PlacementGroup) GetAvailableRouters(datacenterId *int) (resp []datatypes.Hardware, err error) {
params := []interface{}{
datacenterId,
}
err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getAvailableRouters", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_PlacementGroup",
")",
"GetAvailableRouters",
"(",
"datacenterId",
"*",
"int",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Hardware",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"datacenterId",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Returns all routers available for use with placement groups. If a datacenter location ID is provided, this method will further restrict the list of routers to ones contained within that datacenter. | [
"Returns",
"all",
"routers",
"available",
"for",
"use",
"with",
"placement",
"groups",
".",
"If",
"a",
"datacenter",
"location",
"ID",
"is",
"provided",
"this",
"method",
"will",
"further",
"restrict",
"the",
"list",
"of",
"routers",
"to",
"ones",
"contained",
"within",
"that",
"datacenter",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3210-L3216 |
6,661 | softlayer/softlayer-go | services/virtual.go | GetBackendRouter | func (r Virtual_PlacementGroup) GetBackendRouter() (resp datatypes.Hardware_Router_Backend, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getBackendRouter", nil, &r.Options, &resp)
return
} | go | func (r Virtual_PlacementGroup) GetBackendRouter() (resp datatypes.Hardware_Router_Backend, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getBackendRouter", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_PlacementGroup",
")",
"GetBackendRouter",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Hardware_Router_Backend",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The router the placement group is implemented on. | [
"Retrieve",
"The",
"router",
"the",
"placement",
"group",
"is",
"implemented",
"on",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3219-L3222 |
6,662 | softlayer/softlayer-go | services/virtual.go | GetRule | func (r Virtual_PlacementGroup) GetRule() (resp datatypes.Virtual_PlacementGroup_Rule, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getRule", nil, &r.Options, &resp)
return
} | go | func (r Virtual_PlacementGroup) GetRule() (resp datatypes.Virtual_PlacementGroup_Rule, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getRule", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_PlacementGroup",
")",
"GetRule",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Virtual_PlacementGroup_Rule",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The placement rule that the placement group is implementing. | [
"Retrieve",
"The",
"placement",
"rule",
"that",
"the",
"placement",
"group",
"is",
"implementing",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3237-L3240 |
6,663 | softlayer/softlayer-go | services/virtual.go | GetAvailableInstances | func (r Virtual_ReservedCapacityGroup) GetAvailableInstances() (resp []datatypes.Virtual_ReservedCapacityGroup_Instance, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getAvailableInstances", nil, &r.Options, &resp)
return
} | go | func (r Virtual_ReservedCapacityGroup) GetAvailableInstances() (resp []datatypes.Virtual_ReservedCapacityGroup_Instance, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getAvailableInstances", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_ReservedCapacityGroup",
")",
"GetAvailableInstances",
"(",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Virtual_ReservedCapacityGroup_Instance",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The instances available for guest provisions on this reserved capacity group. | [
"Retrieve",
"The",
"instances",
"available",
"for",
"guest",
"provisions",
"on",
"this",
"reserved",
"capacity",
"group",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3350-L3353 |
6,664 | softlayer/softlayer-go | services/virtual.go | GetInstancesCount | func (r Virtual_ReservedCapacityGroup) GetInstancesCount() (resp uint, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getInstancesCount", nil, &r.Options, &resp)
return
} | go | func (r Virtual_ReservedCapacityGroup) GetInstancesCount() (resp uint, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getInstancesCount", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_ReservedCapacityGroup",
")",
"GetInstancesCount",
"(",
")",
"(",
"resp",
"uint",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve The number of instances that are members of this reserved capacity group. | [
"Retrieve",
"The",
"number",
"of",
"instances",
"that",
"are",
"members",
"of",
"this",
"reserved",
"capacity",
"group",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3368-L3371 |
6,665 | softlayer/softlayer-go | services/virtual.go | GetAvailableFlag | func (r Virtual_ReservedCapacityGroup_Instance) GetAvailableFlag() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup_Instance", "getAvailableFlag", nil, &r.Options, &resp)
return
} | go | func (r Virtual_ReservedCapacityGroup_Instance) GetAvailableFlag() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup_Instance", "getAvailableFlag", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_ReservedCapacityGroup_Instance",
")",
"GetAvailableFlag",
"(",
")",
"(",
"resp",
"bool",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve Flag to indecate whether or not the reserved instance is available or not. | [
"Retrieve",
"Flag",
"to",
"indecate",
"whether",
"or",
"not",
"the",
"reserved",
"instance",
"is",
"available",
"or",
"not",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3426-L3429 |
6,666 | softlayer/softlayer-go | services/virtual.go | GetArchiveDiskUsageRatePerGb | func (r Virtual_Storage_Repository) GetArchiveDiskUsageRatePerGb() (resp datatypes.Float64, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getArchiveDiskUsageRatePerGb", nil, &r.Options, &resp)
return
} | go | func (r Virtual_Storage_Repository) GetArchiveDiskUsageRatePerGb() (resp datatypes.Float64, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getArchiveDiskUsageRatePerGb", nil, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Storage_Repository",
")",
"GetArchiveDiskUsageRatePerGb",
"(",
")",
"(",
"resp",
"datatypes",
".",
"Float64",
",",
"err",
"error",
")",
"{",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Returns the archive storage disk usage fee rate per gigabyte. | [
"Returns",
"the",
"archive",
"storage",
"disk",
"usage",
"fee",
"rate",
"per",
"gigabyte",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3502-L3505 |
6,667 | softlayer/softlayer-go | services/virtual.go | GetAverageDiskUsageMetricDataFromInfluxByDate | func (r Virtual_Storage_Repository) GetAverageDiskUsageMetricDataFromInfluxByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp datatypes.Float64, err error) {
params := []interface{}{
startDateTime,
endDateTime,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getAverageDiskUsageMetricDataFromInfluxByDate", params, &r.Options, &resp)
return
} | go | func (r Virtual_Storage_Repository) GetAverageDiskUsageMetricDataFromInfluxByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp datatypes.Float64, err error) {
params := []interface{}{
startDateTime,
endDateTime,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getAverageDiskUsageMetricDataFromInfluxByDate", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Virtual_Storage_Repository",
")",
"GetAverageDiskUsageMetricDataFromInfluxByDate",
"(",
"startDateTime",
"*",
"datatypes",
".",
"Time",
",",
"endDateTime",
"*",
"datatypes",
".",
"Time",
")",
"(",
"resp",
"datatypes",
".",
"Float64",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"startDateTime",
",",
"endDateTime",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Returns the average disk space usage for a storage repository. | [
"Returns",
"the",
"average",
"disk",
"space",
"usage",
"for",
"a",
"storage",
"repository",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/virtual.go#L3508-L3515 |
6,668 | softlayer/softlayer-go | filter/filters.go | Path | func Path(path string, val ...interface{}) Filter {
if len(val) > 0 {
return Filter{Path: path, Val: val[0]}
}
return Filter{Path: path}
} | go | func Path(path string, val ...interface{}) Filter {
if len(val) > 0 {
return Filter{Path: path, Val: val[0]}
}
return Filter{Path: path}
} | [
"func",
"Path",
"(",
"path",
"string",
",",
"val",
"...",
"interface",
"{",
"}",
")",
"Filter",
"{",
"if",
"len",
"(",
"val",
")",
">",
"0",
"{",
"return",
"Filter",
"{",
"Path",
":",
"path",
",",
"Val",
":",
"val",
"[",
"0",
"]",
"}",
"\n",
"}",
"\n\n",
"return",
"Filter",
"{",
"Path",
":",
"path",
"}",
"\n",
"}"
] | // This creates a new Filter. The path is a dot-delimited path down
// to the attribute this filter is for. The second value parameter
// is optional. | [
"This",
"creates",
"a",
"new",
"Filter",
".",
"The",
"path",
"is",
"a",
"dot",
"-",
"delimited",
"path",
"down",
"to",
"the",
"attribute",
"this",
"filter",
"is",
"for",
".",
"The",
"second",
"value",
"parameter",
"is",
"optional",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L56-L62 |
6,669 | softlayer/softlayer-go | filter/filters.go | Build | func (fs Filters) Build() string {
// Loops around filters,
// splitting path on '.' and looping around path pieces.
// Idea is to create a map/tree like map[string]interface{}.
// Every component in the path is a node to create in the tree.
// Once we get to the leaf, we set the operation.
// map[string]interface{}{"operation": op+" "+value}
// If Op is "", then just map[string]interface{}{"operation": value}.
// Afterwards, the Opts are traversed; []map[string]interface{}{}
// For every entry in Opts, we create one map, and append it to an array of maps.
// At the end, json.Marshal the whole thing.
result := map[string]interface{}{}
for _, filter := range fs {
if filter.Path == "" {
continue
}
cursor := result
nodes := strings.Split(filter.Path, ".")
for len(nodes) > 1 {
branch := nodes[0]
if _, ok := cursor[branch]; !ok {
cursor[branch] = map[string]interface{}{}
}
cursor = cursor[branch].(map[string]interface{})
nodes = nodes[1:len(nodes)]
}
leaf := nodes[0]
if filter.Val != nil {
operation := filter.Val
if filter.Op != "" {
var format string
switch filter.Val.(type) {
case int:
format = "%d"
default:
format = "%s"
}
operation = filter.Op + " " + fmt.Sprintf(format, filter.Val)
}
cursor[leaf] = map[string]interface{}{
"operation": operation,
}
}
if filter.Opts == nil {
continue
}
options := []map[string]interface{}{}
for name, value := range filter.Opts {
options = append(options, map[string]interface{}{
"name": name,
"value": value,
})
}
if _, found := cursor[leaf]; found { // already have operation
cursor[leaf].(map[string]interface{})["options"] = options
} else {
cursor[leaf] = map[string]interface{}{
"operation": filter.Op,
"options": options,
}
}
}
jsonStr, _ := json.Marshal(result)
return string(jsonStr)
} | go | func (fs Filters) Build() string {
// Loops around filters,
// splitting path on '.' and looping around path pieces.
// Idea is to create a map/tree like map[string]interface{}.
// Every component in the path is a node to create in the tree.
// Once we get to the leaf, we set the operation.
// map[string]interface{}{"operation": op+" "+value}
// If Op is "", then just map[string]interface{}{"operation": value}.
// Afterwards, the Opts are traversed; []map[string]interface{}{}
// For every entry in Opts, we create one map, and append it to an array of maps.
// At the end, json.Marshal the whole thing.
result := map[string]interface{}{}
for _, filter := range fs {
if filter.Path == "" {
continue
}
cursor := result
nodes := strings.Split(filter.Path, ".")
for len(nodes) > 1 {
branch := nodes[0]
if _, ok := cursor[branch]; !ok {
cursor[branch] = map[string]interface{}{}
}
cursor = cursor[branch].(map[string]interface{})
nodes = nodes[1:len(nodes)]
}
leaf := nodes[0]
if filter.Val != nil {
operation := filter.Val
if filter.Op != "" {
var format string
switch filter.Val.(type) {
case int:
format = "%d"
default:
format = "%s"
}
operation = filter.Op + " " + fmt.Sprintf(format, filter.Val)
}
cursor[leaf] = map[string]interface{}{
"operation": operation,
}
}
if filter.Opts == nil {
continue
}
options := []map[string]interface{}{}
for name, value := range filter.Opts {
options = append(options, map[string]interface{}{
"name": name,
"value": value,
})
}
if _, found := cursor[leaf]; found { // already have operation
cursor[leaf].(map[string]interface{})["options"] = options
} else {
cursor[leaf] = map[string]interface{}{
"operation": filter.Op,
"options": options,
}
}
}
jsonStr, _ := json.Marshal(result)
return string(jsonStr)
} | [
"func",
"(",
"fs",
"Filters",
")",
"Build",
"(",
")",
"string",
"{",
"// Loops around filters,",
"// splitting path on '.' and looping around path pieces.",
"// Idea is to create a map/tree like map[string]interface{}.",
"// Every component in the path is a node to create in the tree.",
"// Once we get to the leaf, we set the operation.",
"// map[string]interface{}{\"operation\": op+\" \"+value}",
"// If Op is \"\", then just map[string]interface{}{\"operation\": value}.",
"// Afterwards, the Opts are traversed; []map[string]interface{}{}",
"// For every entry in Opts, we create one map, and append it to an array of maps.",
"// At the end, json.Marshal the whole thing.",
"result",
":=",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"}",
"\n",
"for",
"_",
",",
"filter",
":=",
"range",
"fs",
"{",
"if",
"filter",
".",
"Path",
"==",
"\"",
"\"",
"{",
"continue",
"\n",
"}",
"\n\n",
"cursor",
":=",
"result",
"\n",
"nodes",
":=",
"strings",
".",
"Split",
"(",
"filter",
".",
"Path",
",",
"\"",
"\"",
")",
"\n",
"for",
"len",
"(",
"nodes",
")",
">",
"1",
"{",
"branch",
":=",
"nodes",
"[",
"0",
"]",
"\n",
"if",
"_",
",",
"ok",
":=",
"cursor",
"[",
"branch",
"]",
";",
"!",
"ok",
"{",
"cursor",
"[",
"branch",
"]",
"=",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"}",
"\n",
"}",
"\n",
"cursor",
"=",
"cursor",
"[",
"branch",
"]",
".",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"nodes",
"=",
"nodes",
"[",
"1",
":",
"len",
"(",
"nodes",
")",
"]",
"\n",
"}",
"\n\n",
"leaf",
":=",
"nodes",
"[",
"0",
"]",
"\n",
"if",
"filter",
".",
"Val",
"!=",
"nil",
"{",
"operation",
":=",
"filter",
".",
"Val",
"\n",
"if",
"filter",
".",
"Op",
"!=",
"\"",
"\"",
"{",
"var",
"format",
"string",
"\n",
"switch",
"filter",
".",
"Val",
".",
"(",
"type",
")",
"{",
"case",
"int",
":",
"format",
"=",
"\"",
"\"",
"\n",
"default",
":",
"format",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"operation",
"=",
"filter",
".",
"Op",
"+",
"\"",
"\"",
"+",
"fmt",
".",
"Sprintf",
"(",
"format",
",",
"filter",
".",
"Val",
")",
"\n",
"}",
"\n\n",
"cursor",
"[",
"leaf",
"]",
"=",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"\"",
"\"",
":",
"operation",
",",
"}",
"\n",
"}",
"\n\n",
"if",
"filter",
".",
"Opts",
"==",
"nil",
"{",
"continue",
"\n",
"}",
"\n\n",
"options",
":=",
"[",
"]",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"}",
"\n",
"for",
"name",
",",
"value",
":=",
"range",
"filter",
".",
"Opts",
"{",
"options",
"=",
"append",
"(",
"options",
",",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"\"",
"\"",
":",
"name",
",",
"\"",
"\"",
":",
"value",
",",
"}",
")",
"\n",
"}",
"\n\n",
"if",
"_",
",",
"found",
":=",
"cursor",
"[",
"leaf",
"]",
";",
"found",
"{",
"// already have operation",
"cursor",
"[",
"leaf",
"]",
".",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"[",
"\"",
"\"",
"]",
"=",
"options",
"\n",
"}",
"else",
"{",
"cursor",
"[",
"leaf",
"]",
"=",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"\"",
"\"",
":",
"filter",
".",
"Op",
",",
"\"",
"\"",
":",
"options",
",",
"}",
"\n",
"}",
"\n",
"}",
"\n\n",
"jsonStr",
",",
"_",
":=",
"json",
".",
"Marshal",
"(",
"result",
")",
"\n",
"return",
"string",
"(",
"jsonStr",
")",
"\n",
"}"
] | // Builds the filter string in JSON format | [
"Builds",
"the",
"filter",
"string",
"in",
"JSON",
"format"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L65-L136 |
6,670 | softlayer/softlayer-go | filter/filters.go | Opt | func (f Filter) Opt(name string, value interface{}) Filter {
if f.Opts == nil {
f.Opts = map[string]interface{}{}
}
f.Opts[name] = value
return f
} | go | func (f Filter) Opt(name string, value interface{}) Filter {
if f.Opts == nil {
f.Opts = map[string]interface{}{}
}
f.Opts[name] = value
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"Opt",
"(",
"name",
"string",
",",
"value",
"interface",
"{",
"}",
")",
"Filter",
"{",
"if",
"f",
".",
"Opts",
"==",
"nil",
"{",
"f",
".",
"Opts",
"=",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"}",
"\n",
"}",
"\n\n",
"f",
".",
"Opts",
"[",
"name",
"]",
"=",
"value",
"\n",
"return",
"f",
"\n",
"}"
] | // Add options to the filter. Can be chained for multiple options. | [
"Add",
"options",
"to",
"the",
"filter",
".",
"Can",
"be",
"chained",
"for",
"multiple",
"options",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L144-L151 |
6,671 | softlayer/softlayer-go | filter/filters.go | Eq | func (f Filter) Eq(val interface{}) Filter {
f.Op = ""
f.Val = val
return f
} | go | func (f Filter) Eq(val interface{}) Filter {
f.Op = ""
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"Eq",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property is equal to the value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"is",
"equal",
"to",
"the",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L154-L158 |
6,672 | softlayer/softlayer-go | filter/filters.go | NotEq | func (f Filter) NotEq(val interface{}) Filter {
f.Op = "!="
f.Val = val
return f
} | go | func (f Filter) NotEq(val interface{}) Filter {
f.Op = "!="
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"NotEq",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property is not equal to the value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"is",
"not",
"equal",
"to",
"the",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L161-L165 |
6,673 | softlayer/softlayer-go | filter/filters.go | Like | func (f Filter) Like(val interface{}) Filter {
f.Op = "~"
f.Val = val
return f
} | go | func (f Filter) Like(val interface{}) Filter {
f.Op = "~"
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"Like",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property is like the value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"is",
"like",
"the",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L168-L172 |
6,674 | softlayer/softlayer-go | filter/filters.go | NotLike | func (f Filter) NotLike(val interface{}) Filter {
f.Op = "!~"
f.Val = val
return f
} | go | func (f Filter) NotLike(val interface{}) Filter {
f.Op = "!~"
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"NotLike",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property is unlike value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"is",
"unlike",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L175-L179 |
6,675 | softlayer/softlayer-go | filter/filters.go | LessThan | func (f Filter) LessThan(val interface{}) Filter {
f.Op = "<"
f.Val = val
return f
} | go | func (f Filter) LessThan(val interface{}) Filter {
f.Op = "<"
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"LessThan",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property is less than value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"is",
"less",
"than",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L182-L186 |
6,676 | softlayer/softlayer-go | filter/filters.go | LessThanOrEqual | func (f Filter) LessThanOrEqual(val interface{}) Filter {
f.Op = "<="
f.Val = val
return f
} | go | func (f Filter) LessThanOrEqual(val interface{}) Filter {
f.Op = "<="
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"LessThanOrEqual",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property is less than or equal to the value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"is",
"less",
"than",
"or",
"equal",
"to",
"the",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L189-L193 |
6,677 | softlayer/softlayer-go | filter/filters.go | GreaterThan | func (f Filter) GreaterThan(val interface{}) Filter {
f.Op = ">"
f.Val = val
return f
} | go | func (f Filter) GreaterThan(val interface{}) Filter {
f.Op = ">"
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"GreaterThan",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property is greater than value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"is",
"greater",
"than",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L196-L200 |
6,678 | softlayer/softlayer-go | filter/filters.go | GreaterThanOrEqual | func (f Filter) GreaterThanOrEqual(val interface{}) Filter {
f.Op = ">="
f.Val = val
return f
} | go | func (f Filter) GreaterThanOrEqual(val interface{}) Filter {
f.Op = ">="
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"GreaterThanOrEqual",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property is greater than or equal to value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"is",
"greater",
"than",
"or",
"equal",
"to",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L203-L207 |
6,679 | softlayer/softlayer-go | filter/filters.go | Contains | func (f Filter) Contains(val interface{}) Filter {
f.Op = "*="
f.Val = val
return f
} | go | func (f Filter) Contains(val interface{}) Filter {
f.Op = "*="
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"Contains",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property contains the value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"contains",
"the",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L224-L228 |
6,680 | softlayer/softlayer-go | filter/filters.go | NotContains | func (f Filter) NotContains(val interface{}) Filter {
f.Op = "!*="
f.Val = val
return f
} | go | func (f Filter) NotContains(val interface{}) Filter {
f.Op = "!*="
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"NotContains",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property does not contain the value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"does",
"not",
"contain",
"the",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L231-L235 |
6,681 | softlayer/softlayer-go | filter/filters.go | StartsWith | func (f Filter) StartsWith(val interface{}) Filter {
f.Op = "^="
f.Val = val
return f
} | go | func (f Filter) StartsWith(val interface{}) Filter {
f.Op = "^="
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"StartsWith",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property starts with the value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"starts",
"with",
"the",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L238-L242 |
6,682 | softlayer/softlayer-go | filter/filters.go | NotStartsWith | func (f Filter) NotStartsWith(val interface{}) Filter {
f.Op = "!^="
f.Val = val
return f
} | go | func (f Filter) NotStartsWith(val interface{}) Filter {
f.Op = "!^="
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"NotStartsWith",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property does not start with the value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"does",
"not",
"start",
"with",
"the",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L245-L249 |
6,683 | softlayer/softlayer-go | filter/filters.go | EndsWith | func (f Filter) EndsWith(val interface{}) Filter {
f.Op = "$="
f.Val = val
return f
} | go | func (f Filter) EndsWith(val interface{}) Filter {
f.Op = "$="
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"EndsWith",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property ends with the value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"ends",
"with",
"the",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L252-L256 |
6,684 | softlayer/softlayer-go | filter/filters.go | NotEndsWith | func (f Filter) NotEndsWith(val interface{}) Filter {
f.Op = "!$="
f.Val = val
return f
} | go | func (f Filter) NotEndsWith(val interface{}) Filter {
f.Op = "!$="
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"NotEndsWith",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property does not end with the value | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"does",
"not",
"end",
"with",
"the",
"value"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L259-L263 |
6,685 | softlayer/softlayer-go | filter/filters.go | In | func (f Filter) In(args ...interface{}) Filter {
f.Op = "in"
values := []interface{}{}
for _, arg := range args {
values = append(values, arg)
}
return f.Opt("data", values)
} | go | func (f Filter) In(args ...interface{}) Filter {
f.Op = "in"
values := []interface{}{}
for _, arg := range args {
values = append(values, arg)
}
return f.Opt("data", values)
} | [
"func",
"(",
"f",
"Filter",
")",
"In",
"(",
"args",
"...",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"values",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"}",
"\n",
"for",
"_",
",",
"arg",
":=",
"range",
"args",
"{",
"values",
"=",
"append",
"(",
"values",
",",
"arg",
")",
"\n",
"}",
"\n\n",
"return",
"f",
".",
"Opt",
"(",
"\"",
"\"",
",",
"values",
")",
"\n",
"}"
] | // Set this filter to test if property is one of the values in args. | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"is",
"one",
"of",
"the",
"values",
"in",
"args",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L266-L274 |
6,686 | softlayer/softlayer-go | filter/filters.go | DaysPast | func (f Filter) DaysPast(val interface{}) Filter {
f.Op = ">= currentDate -"
f.Val = val
return f
} | go | func (f Filter) DaysPast(val interface{}) Filter {
f.Op = ">= currentDate -"
f.Val = val
return f
} | [
"func",
"(",
"f",
"Filter",
")",
"DaysPast",
"(",
"val",
"interface",
"{",
"}",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"val",
"\n",
"return",
"f",
"\n",
"}"
] | // Set this filter to test if property has a date older than the value in days. | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"has",
"a",
"date",
"older",
"than",
"the",
"value",
"in",
"days",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L277-L281 |
6,687 | softlayer/softlayer-go | filter/filters.go | Date | func (f Filter) Date(date string) Filter {
f.Op = "isDate"
f.Val = nil
return f.Opt("date", []string{date})
} | go | func (f Filter) Date(date string) Filter {
f.Op = "isDate"
f.Val = nil
return f.Opt("date", []string{date})
} | [
"func",
"(",
"f",
"Filter",
")",
"Date",
"(",
"date",
"string",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"nil",
"\n",
"return",
"f",
".",
"Opt",
"(",
"\"",
"\"",
",",
"[",
"]",
"string",
"{",
"date",
"}",
")",
"\n",
"}"
] | // Set this filter to test if property has the exact date as the value. | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"has",
"the",
"exact",
"date",
"as",
"the",
"value",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L284-L288 |
6,688 | softlayer/softlayer-go | filter/filters.go | DateBetween | func (f Filter) DateBetween(start string, end string) Filter {
f.Op = "betweenDate"
f.Val = nil
return f.Opt("startDate", []string{start}).Opt("endDate", []string{end})
} | go | func (f Filter) DateBetween(start string, end string) Filter {
f.Op = "betweenDate"
f.Val = nil
return f.Opt("startDate", []string{start}).Opt("endDate", []string{end})
} | [
"func",
"(",
"f",
"Filter",
")",
"DateBetween",
"(",
"start",
"string",
",",
"end",
"string",
")",
"Filter",
"{",
"f",
".",
"Op",
"=",
"\"",
"\"",
"\n",
"f",
".",
"Val",
"=",
"nil",
"\n",
"return",
"f",
".",
"Opt",
"(",
"\"",
"\"",
",",
"[",
"]",
"string",
"{",
"start",
"}",
")",
".",
"Opt",
"(",
"\"",
"\"",
",",
"[",
"]",
"string",
"{",
"end",
"}",
")",
"\n",
"}"
] | // Set this filter to test if property has a date between the values. | [
"Set",
"this",
"filter",
"to",
"test",
"if",
"property",
"has",
"a",
"date",
"between",
"the",
"values",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/filter/filters.go#L305-L309 |
6,689 | softlayer/softlayer-go | helpers/network/network.go | GetNadcLbVipByName | func GetNadcLbVipByName(sess *session.Session, nadcId int, vipName string, mask ...string) (*datatypes.Network_LoadBalancer_VirtualIpAddress, error) {
service := services.GetNetworkApplicationDeliveryControllerService(sess)
service = service.
Id(nadcId)
if len(mask) > 0 {
service = service.Mask(mask[0])
}
vips, err := service.GetLoadBalancers()
if err != nil {
return nil, fmt.Errorf("Error getting NADC load balancers: %s", err)
}
for _, vip := range vips {
if *vip.Name == vipName {
return &vip, nil
}
}
return nil, fmt.Errorf("Could not find any VIPs for NADC %d matching name %s", nadcId, vipName)
} | go | func GetNadcLbVipByName(sess *session.Session, nadcId int, vipName string, mask ...string) (*datatypes.Network_LoadBalancer_VirtualIpAddress, error) {
service := services.GetNetworkApplicationDeliveryControllerService(sess)
service = service.
Id(nadcId)
if len(mask) > 0 {
service = service.Mask(mask[0])
}
vips, err := service.GetLoadBalancers()
if err != nil {
return nil, fmt.Errorf("Error getting NADC load balancers: %s", err)
}
for _, vip := range vips {
if *vip.Name == vipName {
return &vip, nil
}
}
return nil, fmt.Errorf("Could not find any VIPs for NADC %d matching name %s", nadcId, vipName)
} | [
"func",
"GetNadcLbVipByName",
"(",
"sess",
"*",
"session",
".",
"Session",
",",
"nadcId",
"int",
",",
"vipName",
"string",
",",
"mask",
"...",
"string",
")",
"(",
"*",
"datatypes",
".",
"Network_LoadBalancer_VirtualIpAddress",
",",
"error",
")",
"{",
"service",
":=",
"services",
".",
"GetNetworkApplicationDeliveryControllerService",
"(",
"sess",
")",
"\n\n",
"service",
"=",
"service",
".",
"Id",
"(",
"nadcId",
")",
"\n\n",
"if",
"len",
"(",
"mask",
")",
">",
"0",
"{",
"service",
"=",
"service",
".",
"Mask",
"(",
"mask",
"[",
"0",
"]",
")",
"\n",
"}",
"\n\n",
"vips",
",",
"err",
":=",
"service",
".",
"GetLoadBalancers",
"(",
")",
"\n\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"err",
")",
"\n",
"}",
"\n\n",
"for",
"_",
",",
"vip",
":=",
"range",
"vips",
"{",
"if",
"*",
"vip",
".",
"Name",
"==",
"vipName",
"{",
"return",
"&",
"vip",
",",
"nil",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"nadcId",
",",
"vipName",
")",
"\n",
"}"
] | // GetNadcLbVipByName Get a virtual ip address by name attached to a load balancer
// appliance like the Netscaler VPX. In the case of some load balancer appliances
// looking up the virtual ip address by name is necessary since they don't get
// assigned an id. | [
"GetNadcLbVipByName",
"Get",
"a",
"virtual",
"ip",
"address",
"by",
"name",
"attached",
"to",
"a",
"load",
"balancer",
"appliance",
"like",
"the",
"Netscaler",
"VPX",
".",
"In",
"the",
"case",
"of",
"some",
"load",
"balancer",
"appliances",
"looking",
"up",
"the",
"virtual",
"ip",
"address",
"by",
"name",
"is",
"necessary",
"since",
"they",
"don",
"t",
"get",
"assigned",
"an",
"id",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/helpers/network/network.go#L32-L55 |
6,690 | softlayer/softlayer-go | helpers/network/network.go | GetNadcLbVipServiceByName | func GetNadcLbVipServiceByName(
sess *session.Session, nadcId int, vipName string, serviceName string, mask ...string,
) (*datatypes.Network_LoadBalancer_Service, error) {
vipMask := "id,name,services[name,destinationIpAddress,destinationPort,weight,healthCheck,connectionLimit]"
if len(mask) != 0 {
vipMask = mask[0]
}
vip, err := GetNadcLbVipByName(sess, nadcId, vipName, vipMask)
if err != nil {
return nil, err
}
for _, service := range vip.Services {
if *service.Name == serviceName {
return &service, nil
}
}
return nil, fmt.Errorf(
"Could not find service %s in VIP %s for load balancer %d",
serviceName, vipName, nadcId)
} | go | func GetNadcLbVipServiceByName(
sess *session.Session, nadcId int, vipName string, serviceName string, mask ...string,
) (*datatypes.Network_LoadBalancer_Service, error) {
vipMask := "id,name,services[name,destinationIpAddress,destinationPort,weight,healthCheck,connectionLimit]"
if len(mask) != 0 {
vipMask = mask[0]
}
vip, err := GetNadcLbVipByName(sess, nadcId, vipName, vipMask)
if err != nil {
return nil, err
}
for _, service := range vip.Services {
if *service.Name == serviceName {
return &service, nil
}
}
return nil, fmt.Errorf(
"Could not find service %s in VIP %s for load balancer %d",
serviceName, vipName, nadcId)
} | [
"func",
"GetNadcLbVipServiceByName",
"(",
"sess",
"*",
"session",
".",
"Session",
",",
"nadcId",
"int",
",",
"vipName",
"string",
",",
"serviceName",
"string",
",",
"mask",
"...",
"string",
",",
")",
"(",
"*",
"datatypes",
".",
"Network_LoadBalancer_Service",
",",
"error",
")",
"{",
"vipMask",
":=",
"\"",
"\"",
"\n\n",
"if",
"len",
"(",
"mask",
")",
"!=",
"0",
"{",
"vipMask",
"=",
"mask",
"[",
"0",
"]",
"\n",
"}",
"\n\n",
"vip",
",",
"err",
":=",
"GetNadcLbVipByName",
"(",
"sess",
",",
"nadcId",
",",
"vipName",
",",
"vipMask",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"for",
"_",
",",
"service",
":=",
"range",
"vip",
".",
"Services",
"{",
"if",
"*",
"service",
".",
"Name",
"==",
"serviceName",
"{",
"return",
"&",
"service",
",",
"nil",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"serviceName",
",",
"vipName",
",",
"nadcId",
")",
"\n",
"}"
] | // GetNadcLbVipServiceByName Get a load balancer service by name attached to a load balancer
// appliance like the Netscaler VPX. In the case of some load balancer appliances
// looking up the virtual ip address by name is necessary since they don't get
// assigned an id. | [
"GetNadcLbVipServiceByName",
"Get",
"a",
"load",
"balancer",
"service",
"by",
"name",
"attached",
"to",
"a",
"load",
"balancer",
"appliance",
"like",
"the",
"Netscaler",
"VPX",
".",
"In",
"the",
"case",
"of",
"some",
"load",
"balancer",
"appliances",
"looking",
"up",
"the",
"virtual",
"ip",
"address",
"by",
"name",
"is",
"necessary",
"since",
"they",
"don",
"t",
"get",
"assigned",
"an",
"id",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/helpers/network/network.go#L61-L84 |
6,691 | softlayer/softlayer-go | services/provisioning.go | GetMaintenanceClassification | func (r Provisioning_Maintenance_Classification) GetMaintenanceClassification(maintenanceClassificationId *int) (resp []datatypes.Provisioning_Maintenance_Classification, err error) {
params := []interface{}{
maintenanceClassificationId,
}
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassification", params, &r.Options, &resp)
return
} | go | func (r Provisioning_Maintenance_Classification) GetMaintenanceClassification(maintenanceClassificationId *int) (resp []datatypes.Provisioning_Maintenance_Classification, err error) {
params := []interface{}{
maintenanceClassificationId,
}
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassification", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Provisioning_Maintenance_Classification",
")",
"GetMaintenanceClassification",
"(",
"maintenanceClassificationId",
"*",
"int",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Provisioning_Maintenance_Classification",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"maintenanceClassificationId",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // Retrieve an array of SoftLayer_Provisioning_Maintenance_Classification data types, which contain all maintenance classifications. | [
"Retrieve",
"an",
"array",
"of",
"SoftLayer_Provisioning_Maintenance_Classification",
"data",
"types",
"which",
"contain",
"all",
"maintenance",
"classifications",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/provisioning.go#L213-L219 |
6,692 | softlayer/softlayer-go | services/provisioning.go | GetMaintenanceWindows | func (r Provisioning_Maintenance_Window) GetMaintenanceWindows(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) {
params := []interface{}{
beginDate,
endDate,
locationId,
slotsNeeded,
}
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindows", params, &r.Options, &resp)
return
} | go | func (r Provisioning_Maintenance_Window) GetMaintenanceWindows(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) {
params := []interface{}{
beginDate,
endDate,
locationId,
slotsNeeded,
}
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindows", params, &r.Options, &resp)
return
} | [
"func",
"(",
"r",
"Provisioning_Maintenance_Window",
")",
"GetMaintenanceWindows",
"(",
"beginDate",
"*",
"datatypes",
".",
"Time",
",",
"endDate",
"*",
"datatypes",
".",
"Time",
",",
"locationId",
"*",
"int",
",",
"slotsNeeded",
"*",
"int",
")",
"(",
"resp",
"[",
"]",
"datatypes",
".",
"Provisioning_Maintenance_Window",
",",
"err",
"error",
")",
"{",
"params",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"beginDate",
",",
"endDate",
",",
"locationId",
",",
"slotsNeeded",
",",
"}",
"\n",
"err",
"=",
"r",
".",
"Session",
".",
"DoRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"params",
",",
"&",
"r",
".",
"Options",
",",
"&",
"resp",
")",
"\n",
"return",
"\n",
"}"
] | // This method returns a list of available maintenance windows | [
"This",
"method",
"returns",
"a",
"list",
"of",
"available",
"maintenance",
"windows"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/services/provisioning.go#L478-L487 |
6,693 | softlayer/softlayer-go | helpers/product/product.go | GetPackageByType | func GetPackageByType(
sess *session.Session,
packageType string,
mask ...string,
) (datatypes.Product_Package, error) {
objectMask := "id,name,description,isActive,type[keyName]"
if len(mask) > 0 {
objectMask = mask[0]
}
service := services.GetProductPackageService(sess)
// Get package id
packages, err := service.
Mask(objectMask).
Filter(
filter.Build(
filter.Path("type.keyName").Eq(packageType),
),
).
Limit(1).
GetAllObjects()
if err != nil {
return datatypes.Product_Package{}, err
}
packages = rejectOutletPackages(packages)
if len(packages) == 0 {
return datatypes.Product_Package{}, fmt.Errorf("No product packages found for %s", packageType)
}
return packages[0], nil
} | go | func GetPackageByType(
sess *session.Session,
packageType string,
mask ...string,
) (datatypes.Product_Package, error) {
objectMask := "id,name,description,isActive,type[keyName]"
if len(mask) > 0 {
objectMask = mask[0]
}
service := services.GetProductPackageService(sess)
// Get package id
packages, err := service.
Mask(objectMask).
Filter(
filter.Build(
filter.Path("type.keyName").Eq(packageType),
),
).
Limit(1).
GetAllObjects()
if err != nil {
return datatypes.Product_Package{}, err
}
packages = rejectOutletPackages(packages)
if len(packages) == 0 {
return datatypes.Product_Package{}, fmt.Errorf("No product packages found for %s", packageType)
}
return packages[0], nil
} | [
"func",
"GetPackageByType",
"(",
"sess",
"*",
"session",
".",
"Session",
",",
"packageType",
"string",
",",
"mask",
"...",
"string",
",",
")",
"(",
"datatypes",
".",
"Product_Package",
",",
"error",
")",
"{",
"objectMask",
":=",
"\"",
"\"",
"\n",
"if",
"len",
"(",
"mask",
")",
">",
"0",
"{",
"objectMask",
"=",
"mask",
"[",
"0",
"]",
"\n",
"}",
"\n\n",
"service",
":=",
"services",
".",
"GetProductPackageService",
"(",
"sess",
")",
"\n\n",
"// Get package id",
"packages",
",",
"err",
":=",
"service",
".",
"Mask",
"(",
"objectMask",
")",
".",
"Filter",
"(",
"filter",
".",
"Build",
"(",
"filter",
".",
"Path",
"(",
"\"",
"\"",
")",
".",
"Eq",
"(",
"packageType",
")",
",",
")",
",",
")",
".",
"Limit",
"(",
"1",
")",
".",
"GetAllObjects",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"datatypes",
".",
"Product_Package",
"{",
"}",
",",
"err",
"\n",
"}",
"\n\n",
"packages",
"=",
"rejectOutletPackages",
"(",
"packages",
")",
"\n\n",
"if",
"len",
"(",
"packages",
")",
"==",
"0",
"{",
"return",
"datatypes",
".",
"Product_Package",
"{",
"}",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"packageType",
")",
"\n",
"}",
"\n\n",
"return",
"packages",
"[",
"0",
"]",
",",
"nil",
"\n",
"}"
] | // GetPackageByType Get the Product_Package which matches the specified
// package type | [
"GetPackageByType",
"Get",
"the",
"Product_Package",
"which",
"matches",
"the",
"specified",
"package",
"type"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/helpers/product/product.go#L48-L82 |
6,694 | softlayer/softlayer-go | helpers/product/product.go | rejectOutletPackages | func rejectOutletPackages(packages []datatypes.Product_Package) []datatypes.Product_Package {
selected := []datatypes.Product_Package{}
for _, pkg := range packages {
if (pkg.Name == nil || !strings.Contains(*pkg.Name, "OUTLET")) &&
(pkg.Description == nil || !strings.Contains(*pkg.Description, "OUTLET")) {
selected = append(selected, pkg)
}
}
return selected
} | go | func rejectOutletPackages(packages []datatypes.Product_Package) []datatypes.Product_Package {
selected := []datatypes.Product_Package{}
for _, pkg := range packages {
if (pkg.Name == nil || !strings.Contains(*pkg.Name, "OUTLET")) &&
(pkg.Description == nil || !strings.Contains(*pkg.Description, "OUTLET")) {
selected = append(selected, pkg)
}
}
return selected
} | [
"func",
"rejectOutletPackages",
"(",
"packages",
"[",
"]",
"datatypes",
".",
"Product_Package",
")",
"[",
"]",
"datatypes",
".",
"Product_Package",
"{",
"selected",
":=",
"[",
"]",
"datatypes",
".",
"Product_Package",
"{",
"}",
"\n\n",
"for",
"_",
",",
"pkg",
":=",
"range",
"packages",
"{",
"if",
"(",
"pkg",
".",
"Name",
"==",
"nil",
"||",
"!",
"strings",
".",
"Contains",
"(",
"*",
"pkg",
".",
"Name",
",",
"\"",
"\"",
")",
")",
"&&",
"(",
"pkg",
".",
"Description",
"==",
"nil",
"||",
"!",
"strings",
".",
"Contains",
"(",
"*",
"pkg",
".",
"Description",
",",
"\"",
"\"",
")",
")",
"{",
"selected",
"=",
"append",
"(",
"selected",
",",
"pkg",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"selected",
"\n",
"}"
] | // rejectOutletPackages removes packages whose description or name contains the
// string "OUTLET". | [
"rejectOutletPackages",
"removes",
"packages",
"whose",
"description",
"or",
"name",
"contains",
"the",
"string",
"OUTLET",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/helpers/product/product.go#L86-L98 |
6,695 | softlayer/softlayer-go | helpers/product/product.go | GetPackageProducts | func GetPackageProducts(
sess *session.Session,
packageId int,
mask ...string,
) ([]datatypes.Product_Item, error) {
objectMask := "id,capacity,description,units,keyName,prices[id,locationGroupId,categories[id,name,categoryCode]]"
if len(mask) > 0 {
objectMask = mask[0]
}
service := services.GetProductPackageService(sess)
// Get product items for package id
return service.
Id(packageId).
Mask(objectMask).
GetItems()
} | go | func GetPackageProducts(
sess *session.Session,
packageId int,
mask ...string,
) ([]datatypes.Product_Item, error) {
objectMask := "id,capacity,description,units,keyName,prices[id,locationGroupId,categories[id,name,categoryCode]]"
if len(mask) > 0 {
objectMask = mask[0]
}
service := services.GetProductPackageService(sess)
// Get product items for package id
return service.
Id(packageId).
Mask(objectMask).
GetItems()
} | [
"func",
"GetPackageProducts",
"(",
"sess",
"*",
"session",
".",
"Session",
",",
"packageId",
"int",
",",
"mask",
"...",
"string",
",",
")",
"(",
"[",
"]",
"datatypes",
".",
"Product_Item",
",",
"error",
")",
"{",
"objectMask",
":=",
"\"",
"\"",
"\n",
"if",
"len",
"(",
"mask",
")",
">",
"0",
"{",
"objectMask",
"=",
"mask",
"[",
"0",
"]",
"\n",
"}",
"\n\n",
"service",
":=",
"services",
".",
"GetProductPackageService",
"(",
"sess",
")",
"\n\n",
"// Get product items for package id",
"return",
"service",
".",
"Id",
"(",
"packageId",
")",
".",
"Mask",
"(",
"objectMask",
")",
".",
"GetItems",
"(",
")",
"\n",
"}"
] | // GetPackageProducts Get a list of product items for a specific product
// package ID | [
"GetPackageProducts",
"Get",
"a",
"list",
"of",
"product",
"items",
"for",
"a",
"specific",
"product",
"package",
"ID"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/helpers/product/product.go#L102-L120 |
6,696 | softlayer/softlayer-go | helpers/product/product.go | GetPresetByKeyName | func GetPresetByKeyName(
sess *session.Session,
pkgID int,
presetKeyName string,
mask ...string,
) (datatypes.Product_Package_Preset, error) {
objectMask := "id, name, keyName, description"
if len(mask) > 0 {
objectMask = mask[0]
}
service := services.GetProductPackageService(sess)
// Get preset id
preset, err := service.
Id(pkgID).
Mask(objectMask).
Filter(
filter.Build(
filter.Path("activePresets.keyName").Eq(presetKeyName),
),
).
Limit(1).
GetActivePresets()
if err != nil {
return datatypes.Product_Package_Preset{}, err
}
if len(preset) == 0 {
return datatypes.Product_Package_Preset{}, fmt.Errorf("No product preset found for %s", presetKeyName)
}
return preset[0], nil
} | go | func GetPresetByKeyName(
sess *session.Session,
pkgID int,
presetKeyName string,
mask ...string,
) (datatypes.Product_Package_Preset, error) {
objectMask := "id, name, keyName, description"
if len(mask) > 0 {
objectMask = mask[0]
}
service := services.GetProductPackageService(sess)
// Get preset id
preset, err := service.
Id(pkgID).
Mask(objectMask).
Filter(
filter.Build(
filter.Path("activePresets.keyName").Eq(presetKeyName),
),
).
Limit(1).
GetActivePresets()
if err != nil {
return datatypes.Product_Package_Preset{}, err
}
if len(preset) == 0 {
return datatypes.Product_Package_Preset{}, fmt.Errorf("No product preset found for %s", presetKeyName)
}
return preset[0], nil
} | [
"func",
"GetPresetByKeyName",
"(",
"sess",
"*",
"session",
".",
"Session",
",",
"pkgID",
"int",
",",
"presetKeyName",
"string",
",",
"mask",
"...",
"string",
",",
")",
"(",
"datatypes",
".",
"Product_Package_Preset",
",",
"error",
")",
"{",
"objectMask",
":=",
"\"",
"\"",
"\n",
"if",
"len",
"(",
"mask",
")",
">",
"0",
"{",
"objectMask",
"=",
"mask",
"[",
"0",
"]",
"\n",
"}",
"\n\n",
"service",
":=",
"services",
".",
"GetProductPackageService",
"(",
"sess",
")",
"\n\n",
"// Get preset id",
"preset",
",",
"err",
":=",
"service",
".",
"Id",
"(",
"pkgID",
")",
".",
"Mask",
"(",
"objectMask",
")",
".",
"Filter",
"(",
"filter",
".",
"Build",
"(",
"filter",
".",
"Path",
"(",
"\"",
"\"",
")",
".",
"Eq",
"(",
"presetKeyName",
")",
",",
")",
",",
")",
".",
"Limit",
"(",
"1",
")",
".",
"GetActivePresets",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"datatypes",
".",
"Product_Package_Preset",
"{",
"}",
",",
"err",
"\n",
"}",
"\n\n",
"if",
"len",
"(",
"preset",
")",
"==",
"0",
"{",
"return",
"datatypes",
".",
"Product_Package_Preset",
"{",
"}",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"presetKeyName",
")",
"\n",
"}",
"\n\n",
"return",
"preset",
"[",
"0",
"]",
",",
"nil",
"\n",
"}"
] | // GetPresetByKeyName Get the Product_Package_Preset which matches the specified
// preset key name | [
"GetPresetByKeyName",
"Get",
"the",
"Product_Package_Preset",
"which",
"matches",
"the",
"specified",
"preset",
"key",
"name"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/helpers/product/product.go#L224-L258 |
6,697 | softlayer/softlayer-go | helpers/product/product.go | GetPriceIDByPackageIdandLocationGroups | func GetPriceIDByPackageIdandLocationGroups(sess *session.Session, locationGroupIds []int, packageid int, addon string) (int, error) {
productpackageservice := services.GetProductPackageService(sess)
productpackageservicefilter := strings.Replace(`{"items":{"description":{"operation":"appliance"}}}`, "appliance", addon, -1)
productpackageservicemask := "description,prices.locationGroupId,prices.id"
resp, err := productpackageservice.Mask(productpackageservicemask).Filter(productpackageservicefilter).Id(packageid).GetItems()
if err != nil {
return 0, err
}
m := make(map[int]int)
if len(locationGroupIds) == 0 {
locationGroupIds = append(locationGroupIds, 1)
}
for _, item := range locationGroupIds {
for _, items := range resp {
for _, temp := range items.Prices {
if temp.LocationGroupId == nil {
m[item] = *temp.Id
} else if item == *temp.LocationGroupId {
m[*temp.LocationGroupId] = *temp.Id
}
}
}
if val, ok := m[item]; ok {
return val, nil
}
}
return 0, nil
} | go | func GetPriceIDByPackageIdandLocationGroups(sess *session.Session, locationGroupIds []int, packageid int, addon string) (int, error) {
productpackageservice := services.GetProductPackageService(sess)
productpackageservicefilter := strings.Replace(`{"items":{"description":{"operation":"appliance"}}}`, "appliance", addon, -1)
productpackageservicemask := "description,prices.locationGroupId,prices.id"
resp, err := productpackageservice.Mask(productpackageservicemask).Filter(productpackageservicefilter).Id(packageid).GetItems()
if err != nil {
return 0, err
}
m := make(map[int]int)
if len(locationGroupIds) == 0 {
locationGroupIds = append(locationGroupIds, 1)
}
for _, item := range locationGroupIds {
for _, items := range resp {
for _, temp := range items.Prices {
if temp.LocationGroupId == nil {
m[item] = *temp.Id
} else if item == *temp.LocationGroupId {
m[*temp.LocationGroupId] = *temp.Id
}
}
}
if val, ok := m[item]; ok {
return val, nil
}
}
return 0, nil
} | [
"func",
"GetPriceIDByPackageIdandLocationGroups",
"(",
"sess",
"*",
"session",
".",
"Session",
",",
"locationGroupIds",
"[",
"]",
"int",
",",
"packageid",
"int",
",",
"addon",
"string",
")",
"(",
"int",
",",
"error",
")",
"{",
"productpackageservice",
":=",
"services",
".",
"GetProductPackageService",
"(",
"sess",
")",
"\n",
"productpackageservicefilter",
":=",
"strings",
".",
"Replace",
"(",
"`{\"items\":{\"description\":{\"operation\":\"appliance\"}}}`",
",",
"\"",
"\"",
",",
"addon",
",",
"-",
"1",
")",
"\n",
"productpackageservicemask",
":=",
"\"",
"\"",
"\n",
"resp",
",",
"err",
":=",
"productpackageservice",
".",
"Mask",
"(",
"productpackageservicemask",
")",
".",
"Filter",
"(",
"productpackageservicefilter",
")",
".",
"Id",
"(",
"packageid",
")",
".",
"GetItems",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",
"\n",
"m",
":=",
"make",
"(",
"map",
"[",
"int",
"]",
"int",
")",
"\n",
"if",
"len",
"(",
"locationGroupIds",
")",
"==",
"0",
"{",
"locationGroupIds",
"=",
"append",
"(",
"locationGroupIds",
",",
"1",
")",
"\n",
"}",
"\n",
"for",
"_",
",",
"item",
":=",
"range",
"locationGroupIds",
"{",
"for",
"_",
",",
"items",
":=",
"range",
"resp",
"{",
"for",
"_",
",",
"temp",
":=",
"range",
"items",
".",
"Prices",
"{",
"if",
"temp",
".",
"LocationGroupId",
"==",
"nil",
"{",
"m",
"[",
"item",
"]",
"=",
"*",
"temp",
".",
"Id",
"\n",
"}",
"else",
"if",
"item",
"==",
"*",
"temp",
".",
"LocationGroupId",
"{",
"m",
"[",
"*",
"temp",
".",
"LocationGroupId",
"]",
"=",
"*",
"temp",
".",
"Id",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n",
"if",
"val",
",",
"ok",
":=",
"m",
"[",
"item",
"]",
";",
"ok",
"{",
"return",
"val",
",",
"nil",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"0",
",",
"nil",
"\n",
"}"
] | // GetPriceIDByPackageIdandLocationGroups return the priceId of the item according to the location group ids of the datacenter you specify
// addon is the description of the item for which you want to get its priceId | [
"GetPriceIDByPackageIdandLocationGroups",
"return",
"the",
"priceId",
"of",
"the",
"item",
"according",
"to",
"the",
"location",
"group",
"ids",
"of",
"the",
"datacenter",
"you",
"specify",
"addon",
"is",
"the",
"description",
"of",
"the",
"item",
"for",
"which",
"you",
"want",
"to",
"get",
"its",
"priceId"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/helpers/product/product.go#L300-L327 |
6,698 | softlayer/softlayer-go | datatypes/softlayer.go | UnmarshalJSON | func (f *Float64) UnmarshalJSON(data []byte) error {
// Attempt parsing the float normally
v, err := strconv.ParseFloat(string(data), 64)
// Attempt parsing the float as a string
if err != nil {
if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' {
return fmt.Errorf("malformed data")
}
v, err = strconv.ParseFloat(string(data[1:len(data)-1]), 64)
if err != nil {
return err
}
}
*f = Float64(v)
return nil
} | go | func (f *Float64) UnmarshalJSON(data []byte) error {
// Attempt parsing the float normally
v, err := strconv.ParseFloat(string(data), 64)
// Attempt parsing the float as a string
if err != nil {
if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' {
return fmt.Errorf("malformed data")
}
v, err = strconv.ParseFloat(string(data[1:len(data)-1]), 64)
if err != nil {
return err
}
}
*f = Float64(v)
return nil
} | [
"func",
"(",
"f",
"*",
"Float64",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"// Attempt parsing the float normally",
"v",
",",
"err",
":=",
"strconv",
".",
"ParseFloat",
"(",
"string",
"(",
"data",
")",
",",
"64",
")",
"\n\n",
"// Attempt parsing the float as a string",
"if",
"err",
"!=",
"nil",
"{",
"if",
"len",
"(",
"data",
")",
"<",
"2",
"||",
"data",
"[",
"0",
"]",
"!=",
"'\"'",
"||",
"data",
"[",
"len",
"(",
"data",
")",
"-",
"1",
"]",
"!=",
"'\"'",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"v",
",",
"err",
"=",
"strconv",
".",
"ParseFloat",
"(",
"string",
"(",
"data",
"[",
"1",
":",
"len",
"(",
"data",
")",
"-",
"1",
"]",
")",
",",
"64",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n",
"*",
"f",
"=",
"Float64",
"(",
"v",
")",
"\n",
"return",
"nil",
"\n",
"}"
] | // UnmarshalJSON statisied the json.Unmarshaler interface | [
"UnmarshalJSON",
"statisied",
"the",
"json",
".",
"Unmarshaler",
"interface"
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/datatypes/softlayer.go#L64-L82 |
6,699 | softlayer/softlayer-go | datatypes/softlayer.go | SetComplexType | func SetComplexType(v interface{}) error {
orderDataPtr := reflect.ValueOf(v)
if orderDataPtr.Type().Name() != "" {
return errors.New("Did not pass a pointer to a product order.")
}
orderDataValue := reflect.Indirect(reflect.ValueOf(v))
orderDataType := orderDataValue.Type().Name()
if !strings.HasPrefix(orderDataType, "Container_Product_Order") {
return fmt.Errorf("Did not pass a pointer to a product order: %s", orderDataType)
}
complexTypeField := orderDataValue.FieldByName("ComplexType")
complexType := "SoftLayer_" + orderDataType
complexTypeField.Set(reflect.ValueOf(&complexType))
return nil
} | go | func SetComplexType(v interface{}) error {
orderDataPtr := reflect.ValueOf(v)
if orderDataPtr.Type().Name() != "" {
return errors.New("Did not pass a pointer to a product order.")
}
orderDataValue := reflect.Indirect(reflect.ValueOf(v))
orderDataType := orderDataValue.Type().Name()
if !strings.HasPrefix(orderDataType, "Container_Product_Order") {
return fmt.Errorf("Did not pass a pointer to a product order: %s", orderDataType)
}
complexTypeField := orderDataValue.FieldByName("ComplexType")
complexType := "SoftLayer_" + orderDataType
complexTypeField.Set(reflect.ValueOf(&complexType))
return nil
} | [
"func",
"SetComplexType",
"(",
"v",
"interface",
"{",
"}",
")",
"error",
"{",
"orderDataPtr",
":=",
"reflect",
".",
"ValueOf",
"(",
"v",
")",
"\n",
"if",
"orderDataPtr",
".",
"Type",
"(",
")",
".",
"Name",
"(",
")",
"!=",
"\"",
"\"",
"{",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"orderDataValue",
":=",
"reflect",
".",
"Indirect",
"(",
"reflect",
".",
"ValueOf",
"(",
"v",
")",
")",
"\n",
"orderDataType",
":=",
"orderDataValue",
".",
"Type",
"(",
")",
".",
"Name",
"(",
")",
"\n",
"if",
"!",
"strings",
".",
"HasPrefix",
"(",
"orderDataType",
",",
"\"",
"\"",
")",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"orderDataType",
")",
"\n",
"}",
"\n\n",
"complexTypeField",
":=",
"orderDataValue",
".",
"FieldByName",
"(",
"\"",
"\"",
")",
"\n",
"complexType",
":=",
"\"",
"\"",
"+",
"orderDataType",
"\n",
"complexTypeField",
".",
"Set",
"(",
"reflect",
".",
"ValueOf",
"(",
"&",
"complexType",
")",
")",
"\n\n",
"return",
"nil",
"\n",
"}"
] | // Used to set the appropriate complexType field in the passed product order.
// Employs reflection to determine the type of the passed value and use it
// to derive the complexType to send to SoftLayer. | [
"Used",
"to",
"set",
"the",
"appropriate",
"complexType",
"field",
"in",
"the",
"passed",
"product",
"order",
".",
"Employs",
"reflection",
"to",
"determine",
"the",
"type",
"of",
"the",
"passed",
"value",
"and",
"use",
"it",
"to",
"derive",
"the",
"complexType",
"to",
"send",
"to",
"SoftLayer",
"."
] | aa510384a41b6450fa6a50e943ed32f5e838fada | https://github.com/softlayer/softlayer-go/blob/aa510384a41b6450fa6a50e943ed32f5e838fada/datatypes/softlayer.go#L87-L104 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.