softlayer

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2016 License: Apache-2.0 Imports: 2 Imported by: 138

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetService(name string) (Service, error)

	GetSoftLayer_Account_Service() (SoftLayer_Account_Service, error)
	GetSoftLayer_Virtual_Guest_Service() (SoftLayer_Virtual_Guest_Service, error)
	GetSoftLayer_Virtual_Disk_Image_Service() (SoftLayer_Virtual_Disk_Image_Service, error)
	GetSoftLayer_Security_Ssh_Key_Service() (SoftLayer_Security_Ssh_Key_Service, error)
	GetSoftLayer_Product_Order_Service() (SoftLayer_Product_Order_Service, error)
	GetSoftLayer_Product_Package_Service() (SoftLayer_Product_Package_Service, error)
	GetSoftLayer_Network_Storage_Service() (SoftLayer_Network_Storage_Service, error)
	GetSoftLayer_Network_Storage_Allowed_Host_Service() (SoftLayer_Network_Storage_Allowed_Host_Service, error)
	GetSoftLayer_Billing_Item_Cancellation_Request_Service() (SoftLayer_Billing_Item_Cancellation_Request_Service, error)
	GetSoftLayer_Billing_Item_Service() (SoftLayer_Billing_Item_Service, error)
	GetSoftLayer_Virtual_Guest_Block_Device_Template_Group_Service() (SoftLayer_Virtual_Guest_Block_Device_Template_Group_Service, error)
	GetSoftLayer_Hardware_Service() (SoftLayer_Hardware_Service, error)
	GetSoftLayer_Dns_Domain_Service() (SoftLayer_Dns_Domain_Service, error)
	GetSoftLayer_Dns_Domain_ResourceRecord_Service() (SoftLayer_Dns_Domain_ResourceRecord_Service, error)

	GetHttpClient() HttpClient
}

type HttpClient added in v0.5.0

type HttpClient interface {
	DoRawHttpRequest(path string, requestType string, requestBody *bytes.Buffer) ([]byte, int, error)
	DoRawHttpRequestWithObjectMask(path string, masks []string, requestType string, requestBody *bytes.Buffer) ([]byte, int, error)
	DoRawHttpRequestWithObjectFilter(path string, filters string, requestType string, requestBody *bytes.Buffer) ([]byte, int, error)
	DoRawHttpRequestWithObjectFilterAndObjectMask(path string, masks []string, filters string, requestType string, requestBody *bytes.Buffer) ([]byte, int, error)
	GenerateRequestBody(templateData interface{}) (*bytes.Buffer, error)
	HasErrors(body map[string]interface{}) error

	CheckForHttpResponseErrors(data []byte) error
}

type Service

type Service interface {
	GetName() string
}

type SoftLayer_Account_Service

type SoftLayer_Account_Service interface {
	Service

	GetAccountStatus() (datatypes.SoftLayer_Account_Status, error)
	GetVirtualGuests() ([]datatypes.SoftLayer_Virtual_Guest, error)
	GetVirtualGuestsByFilter(filters string) ([]datatypes.SoftLayer_Virtual_Guest, error)
	GetNetworkStorage() ([]datatypes.SoftLayer_Network_Storage, error)
	GetIscsiNetworkStorage() ([]datatypes.SoftLayer_Network_Storage, error)
	GetIscsiNetworkStorageWithFilter(filter string) ([]datatypes.SoftLayer_Network_Storage, error)
	GetVirtualDiskImages() ([]datatypes.SoftLayer_Virtual_Disk_Image, error)
	GetVirtualDiskImagesWithFilter(filters string) ([]datatypes.SoftLayer_Virtual_Disk_Image, error)
	GetSshKeys() ([]datatypes.SoftLayer_Security_Ssh_Key, error)
	GetBlockDeviceTemplateGroups() ([]datatypes.SoftLayer_Virtual_Guest_Block_Device_Template_Group, error)
	GetBlockDeviceTemplateGroupsWithFilter(filters string) ([]datatypes.SoftLayer_Virtual_Guest_Block_Device_Template_Group, error)
	GetDatacentersWithSubnetAllocations() ([]datatypes.SoftLayer_Location, error)
	GetHardware() ([]datatypes.SoftLayer_Hardware, error)
	GetDomains() ([]datatypes.SoftLayer_Dns_Domain, error)
}

type SoftLayer_Billing_Item_Cancellation_Request_Service added in v0.1.0

type SoftLayer_Billing_Item_Cancellation_Request_Service interface {
	Service

	CreateObject(request datatypes.SoftLayer_Billing_Item_Cancellation_Request) (datatypes.SoftLayer_Billing_Item_Cancellation_Request, error)
}

type SoftLayer_Billing_Item_Service added in v0.6.0

type SoftLayer_Billing_Item_Service interface {
	Service

	CancelService(billingId int) (bool, error)
}

type SoftLayer_Dns_Domain_ResourceRecord_Service added in v0.4.0

type SoftLayer_Dns_Domain_ResourceRecord_Service interface {
	Service

	CreateObject(template datatypes.SoftLayer_Dns_Domain_ResourceRecord_Template) (datatypes.SoftLayer_Dns_Domain_ResourceRecord, error)
	GetObject(recordId int) (datatypes.SoftLayer_Dns_Domain_ResourceRecord, error)
	DeleteObject(recordId int) (bool, error)
	EditObject(recordId int, template datatypes.SoftLayer_Dns_Domain_ResourceRecord) (bool, error)
}

type SoftLayer_Dns_Domain_Service added in v0.4.0

type SoftLayer_Dns_Domain_Service interface {
	Service

	CreateObject(template datatypes.SoftLayer_Dns_Domain_Template) (datatypes.SoftLayer_Dns_Domain, error)
	DeleteObject(dnsId int) (bool, error)
	GetObject(dnsId int) (datatypes.SoftLayer_Dns_Domain, error)
	GetByDomainName(name string) ([]datatypes.SoftLayer_Dns_Domain, error)
}

Modifying existing SoftLayer_Dns_Domain entries is not possible. Changes to zone names should be refactored to creation of new zones. https://sldn.softlayer.com/blog/phil/Getting-started-DNS

type SoftLayer_Hardware_Service added in v0.2.0

type SoftLayer_Hardware_Service interface {
	Service

	AllowAccessToNetworkStorage(id int, storage datatypes.SoftLayer_Network_Storage) (bool, error)

	CreateObject(template datatypes.SoftLayer_Hardware_Template) (datatypes.SoftLayer_Hardware, error)

	FindByIpAddress(ipAddress string) (datatypes.SoftLayer_Hardware, error)

	GetObject(id int) (datatypes.SoftLayer_Hardware, error)
	GetAllowedHost(id int) (datatypes.SoftLayer_Network_Storage_Allowed_Host, error)
	GetAttachedNetworkStorages(id int, nasType string) ([]datatypes.SoftLayer_Network_Storage, error)
	GetDatacenter(id int) (datatypes.SoftLayer_Location, error)
	GetPrimaryIpAddress(id int) (string, error)
	GetPrimaryBackendIpAddress(id int) (string, error)

	PowerOff(instanceId int) (bool, error)
	PowerOffSoft(instanceId int) (bool, error)
	PowerOn(instanceId int) (bool, error)

	RebootDefault(instanceId int) (bool, error)
	RebootSoft(instanceId int) (bool, error)
	RebootHard(instanceId int) (bool, error)

	SetTags(instanceId int, tags []string) (bool, error)
}

type SoftLayer_Network_Storage_Allowed_Host_Service added in v0.3.0

type SoftLayer_Network_Storage_Allowed_Host_Service interface {
	Service

	GetCredential(allowedHostId int) (datatypes.SoftLayer_Network_Storage_Credential, error)
}

type SoftLayer_Network_Storage_Service added in v0.1.0

type SoftLayer_Network_Storage_Service interface {
	Service

	DeleteObject(volumeId int) (bool, error)

	CreateNetworkStorage(size int, capacity int, location string, userHourlyPricing bool) (datatypes.SoftLayer_Network_Storage, error)
	DeleteNetworkStorage(volumeId int, immediateCancellationFlag bool) error
	GetNetworkStorage(volumeId int) (datatypes.SoftLayer_Network_Storage, error)
	GetBillingItem(volumeId int) (datatypes.SoftLayer_Billing_Item, error)
	HasAllowedVirtualGuest(volumeId int, vmId int) (bool, error)
	HasAllowedHardware(volumeId int, vmId int) (bool, error)
	AttachNetworkStorageToVirtualGuest(virtualGuest datatypes.SoftLayer_Virtual_Guest, volumeId int) (bool, error)
	DetachNetworkStorageFromVirtualGuest(virtualGuest datatypes.SoftLayer_Virtual_Guest, volumeId int) error
	AttachNetworkStorageToHardware(hardware datatypes.SoftLayer_Hardware, volumeId int) (bool, error)
	DetachNetworkStorageFromHardware(hardware datatypes.SoftLayer_Hardware, volumeId int) error
}

type SoftLayer_Product_Package_Service added in v0.1.0

type SoftLayer_Product_Package_Service interface {
	Service

	GetItemPrices(packageId int, filters string) ([]datatypes.SoftLayer_Product_Item_Price, error)
	GetItems(packageId int, filters string) ([]datatypes.SoftLayer_Product_Item, error)
	GetItemsByType(packageType string) ([]datatypes.SoftLayer_Product_Item, error)

	GetPackagesByType(packageType string) ([]datatypes.Softlayer_Product_Package, error)
	GetOnePackageByType(packageType string) (datatypes.Softlayer_Product_Package, error)
}

type SoftLayer_Security_Ssh_Key_Service

type SoftLayer_Security_Ssh_Key_Service interface {
	Service

	CreateObject(template datatypes.SoftLayer_Security_Ssh_Key) (datatypes.SoftLayer_Security_Ssh_Key, error)
	GetObject(sshkeyId int) (datatypes.SoftLayer_Security_Ssh_Key, error)
	EditObject(sshkeyId int, template datatypes.SoftLayer_Security_Ssh_Key) (bool, error)
	DeleteObject(sshKeyId int) (bool, error)

	GetSoftwarePasswords(sshKeyId int) ([]datatypes.SoftLayer_Software_Component_Password, error)
}

type SoftLayer_Virtual_Disk_Image_Service added in v0.0.2

type SoftLayer_Virtual_Disk_Image_Service interface {
	Service

	GetObject(id int) (datatypes.SoftLayer_Virtual_Disk_Image, error)
}

type SoftLayer_Virtual_Guest_Block_Device_Template_Group_Service added in v0.1.0

type SoftLayer_Virtual_Guest_Block_Device_Template_Group_Service interface {
	Service

	AddLocations(id int, locations []datatypes.SoftLayer_Location) (bool, error)

	CreateFromExternalSource(configuration datatypes.SoftLayer_Container_Virtual_Guest_Block_Device_Template_Configuration) (datatypes.SoftLayer_Virtual_Guest_Block_Device_Template_Group, error)
	CreatePublicArchiveTransaction(id int, groupName string, summary string, note string, locations []datatypes.SoftLayer_Location) (int, error)
	CopyToExternalSource(configuration datatypes.SoftLayer_Container_Virtual_Guest_Block_Device_Template_Configuration) (bool, error)

	DeleteObject(id int) (datatypes.SoftLayer_Provisioning_Version1_Transaction, error)
	DenySharingAccess(id int, accountId int) (bool, error)

	GetObject(id int) (datatypes.SoftLayer_Virtual_Guest_Block_Device_Template_Group, error)
	GetDatacenters(id int) ([]datatypes.SoftLayer_Location, error)
	GetSshKeys(id int) ([]datatypes.SoftLayer_Security_Ssh_Key, error)
	GetStatus(id int) (datatypes.SoftLayer_Virtual_Guest_Block_Device_Template_Group_Status, error)

	GetStorageLocations(id int) ([]datatypes.SoftLayer_Location, error)

	GetImageType(id int) (datatypes.SoftLayer_Image_Type, error)
	GetImageTypeKeyName(id int) (string, error)

	GetTransaction(id int) (datatypes.SoftLayer_Provisioning_Version1_Transaction, error)

	GetGlobalIdentifier(id int) (string, error)

	PermitSharingAccess(id int, accountId int) (bool, error)

	RemoveLocations(id int, locations []datatypes.SoftLayer_Location) (bool, error)

	SetAvailableLocations(id int, locations []datatypes.SoftLayer_Location) (bool, error)
}

type SoftLayer_Virtual_Guest_Service

type SoftLayer_Virtual_Guest_Service interface {
	Service

	ActivatePrivatePort(instanceId int) (bool, error)
	ActivatePublicPort(instanceId int) (bool, error)
	AttachDiskImage(instanceId int, imageId int) (datatypes.SoftLayer_Provisioning_Version1_Transaction, error)
	AttachEphemeralDisk(instanceId int, diskSize int) (datatypes.SoftLayer_Container_Product_Order_Receipt, error)

	CaptureImage(instanceId int) (datatypes.SoftLayer_Container_Disk_Image_Capture_Template, error)
	CheckHostDiskAvailability(instanceId int, diskCapacity int) (bool, error)
	ConfigureMetadataDisk(instanceId int) (datatypes.SoftLayer_Provisioning_Version1_Transaction, error)
	CreateArchiveTransaction(instanceId int, groupName string, blockDevices []datatypes.SoftLayer_Virtual_Guest_Block_Device, note string) (datatypes.SoftLayer_Provisioning_Version1_Transaction, error)
	CreateObject(template datatypes.SoftLayer_Virtual_Guest_Template) (datatypes.SoftLayer_Virtual_Guest, error)

	DeleteObject(instanceId int) (bool, error)
	DetachDiskImage(instanceId int, imageId int) (datatypes.SoftLayer_Provisioning_Version1_Transaction, error)

	EditObject(instanceId int, template datatypes.SoftLayer_Virtual_Guest) (bool, error)

	IsPingable(instanceId int) (bool, error)
	IsBackendPingable(instanceId int) (bool, error)

	GetActiveTransaction(instanceId int) (datatypes.SoftLayer_Provisioning_Version1_Transaction, error)
	GetLastTransaction(instanceId int) (datatypes.SoftLayer_Provisioning_Version1_Transaction, error)
	GetActiveTransactions(instanceId int) ([]datatypes.SoftLayer_Provisioning_Version1_Transaction, error)
	GetAllowedHost(instanceId int) (datatypes.SoftLayer_Network_Storage_Allowed_Host, error)
	GetLocalDiskFlag(instanceId int) (bool, error)
	GetNetworkComponents(instanceId int) ([]datatypes.SoftLayer_Virtual_Guest_Network_Component, error)
	GetNetworkVlans(instanceId int) ([]datatypes.SoftLayer_Network_Vlan, error)
	GetObject(instanceId int) (datatypes.SoftLayer_Virtual_Guest, error)
	GetObjectByPrimaryIpAddress(ipAddress string) (datatypes.SoftLayer_Virtual_Guest, error)
	GetObjectByPrimaryBackendIpAddress(ipAddress string) (datatypes.SoftLayer_Virtual_Guest, error)
	GetPrimaryIpAddress(instanceId int) (string, error)
	GetPrimaryBackendIpAddress(instanceId int) (string, error)
	GetPrimaryBackendNetworkComponent(instanceId int) (datatypes.SoftLayer_Virtual_Guest_Network_Component, error)
	GetPrimaryNetworkComponent(instanceId int) (datatypes.SoftLayer_Virtual_Guest_Network_Component, error)
	GetPowerState(instanceId int) (datatypes.SoftLayer_Virtual_Guest_Power_State, error)
	GetSshKeys(instanceId int) ([]datatypes.SoftLayer_Security_Ssh_Key, error)
	GetTagReferences(instanceId int) ([]datatypes.SoftLayer_Tag_Reference, error)
	GetUpgradeItemPrices(instanceId int) ([]datatypes.SoftLayer_Product_Item_Price, error)
	GetUserData(instanceId int) ([]datatypes.SoftLayer_Virtual_Guest_Attribute, error)
	GetAvailableUpgradeItemPrices(upgradeOptions *UpgradeOptions) ([]datatypes.SoftLayer_Product_Item_Price, error)

	PowerCycle(instanceId int) (bool, error)
	PowerOff(instanceId int) (bool, error)
	PowerOffSoft(instanceId int) (bool, error)
	PowerOn(instanceId int) (bool, error)

	RebootDefault(instanceId int) (bool, error)
	RebootSoft(instanceId int) (bool, error)
	RebootHard(instanceId int) (bool, error)

	SetMetadata(instanceId int, metadata string) (bool, error)
	SetTags(instanceId int, tags []string) (bool, error)
	ShutdownPrivatePort(instanceId int) (bool, error)
	ShutdownPublicPort(instanceId int) (bool, error)
	ReloadOperatingSystem(instanceId int, template datatypes.Image_Template_Config) error

	UpgradeObject(instanceId int, upgradeOptions *UpgradeOptions) (bool, error)
}

type UpgradeOptions added in v0.4.0

type UpgradeOptions struct {
	Cpus       int
	MemoryInGB int // Softlayer allows to upgrade Memory only in GB
	NicSpeed   int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL