resources

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDataDiskSize      string = "100"
	DefaultDiskUsagePlanType string = "hourly"
)
View Source
const (
	DefaultNLBOption      string = "roundrobin" // NLBOption : roundrobin / leastconnection / leastresponse / sourceiphash /
	DefaultHealthCheckURL string = "abc.kt.com"
	NlbSubnetName         string = "NLB-SUBNET" // Subnet for NLB
	DefaultVMGroupPort    string = "80"
)
View Source
const (
	LnxUserName string = "cb-user"
	WinUserName string = "Administrator"

	UbuntuCloudInitFilePath string = "/cloud-driver-libs/.cloud-init-ktcloudvpc/cloud-init-ubuntu"
	CentosCloudInitFilePath string = "/cloud-driver-libs/.cloud-init-ktcloudvpc/cloud-init-centos"
	WinCloudInitFilePath    string = "/cloud-driver-libs/.cloud-init-ktcloudvpc/cloud-init-windows"

	DefaultUsagePlan        string = "hourly"
	DefaultDiskSize         string = "50"
	DefaultDiskSize2        string = "100"
	DefaultWinRootDiskSize  string = "100"
	DefaultWinRootDiskSize2 string = "150"
)

Variables

This section is empty.

Functions

func InitLog

func InitLog()

Types

type IId

type IId struct {
	NameID   string `json:"NameId"`
	SystemID string `json:"SystemId"`
}

type KTVpcDiskHandler

type KTVpcDiskHandler struct {
	RegionInfo   idrv.RegionInfo
	VMClient     *ktvpcsdk.ServiceClient
	VolumeClient *ktvpcsdk.ServiceClient
}

func (*KTVpcDiskHandler) AttachDisk

func (diskHandler *KTVpcDiskHandler) AttachDisk(diskIID irs.IID, vmIID irs.IID) (irs.DiskInfo, error)

func (*KTVpcDiskHandler) ChangeDiskSize

func (diskHandler *KTVpcDiskHandler) ChangeDiskSize(diskIID irs.IID, newDiskSize string) (bool, error)

func (*KTVpcDiskHandler) CreateDisk

func (diskHandler *KTVpcDiskHandler) CreateDisk(diskReqInfo irs.DiskInfo) (irs.DiskInfo, error)

func (*KTVpcDiskHandler) DeleteDisk

func (diskHandler *KTVpcDiskHandler) DeleteDisk(diskIID irs.IID) (bool, error)

func (*KTVpcDiskHandler) DetachDisk

func (diskHandler *KTVpcDiskHandler) DetachDisk(diskIID irs.IID, vmIID irs.IID) (bool, error)

func (*KTVpcDiskHandler) GetDisk

func (diskHandler *KTVpcDiskHandler) GetDisk(diskIID irs.IID) (irs.DiskInfo, error)

func (*KTVpcDiskHandler) ListDisk

func (diskHandler *KTVpcDiskHandler) ListDisk() ([]*irs.DiskInfo, error)

func (*KTVpcDiskHandler) ListIID added in v0.9.6

func (DiskHandler *KTVpcDiskHandler) ListIID() ([]*irs.IID, error)

type KTVpcImageHandler

type KTVpcImageHandler struct {
	RegionInfo  idrv.RegionInfo
	VMClient    *ktvpcsdk.ServiceClient
	ImageClient *ktvpcsdk.ServiceClient
}

func (*KTVpcImageHandler) CheckWindowsImage

func (imageHandler *KTVpcImageHandler) CheckWindowsImage(imageIID irs.IID) (bool, error)

func (*KTVpcImageHandler) CreateImage

func (imageHandler *KTVpcImageHandler) CreateImage(imageReqInfo irs.ImageReqInfo) (irs.ImageInfo, error)

func (*KTVpcImageHandler) DeleteImage

func (imageHandler *KTVpcImageHandler) DeleteImage(imageIID irs.IID) (bool, error)

func (*KTVpcImageHandler) GetImage

func (imageHandler *KTVpcImageHandler) GetImage(imageIID irs.IID) (irs.ImageInfo, error)

func (*KTVpcImageHandler) ListImage

func (imageHandler *KTVpcImageHandler) ListImage() ([]*irs.ImageInfo, error)

type KTVpcKeyPairHandler

type KTVpcKeyPairHandler struct {
	CredentialInfo idrv.CredentialInfo
	RegionInfo     idrv.RegionInfo
	VMClient       *ktvpcsdk.ServiceClient
}

func (*KTVpcKeyPairHandler) CreateKey

func (keyPairHandler *KTVpcKeyPairHandler) CreateKey(keyPairReqInfo irs.KeyPairReqInfo) (irs.KeyPairInfo, error)

func (*KTVpcKeyPairHandler) DeleteKey

func (keyPairHandler *KTVpcKeyPairHandler) DeleteKey(keyIID irs.IID) (bool, error)

func (*KTVpcKeyPairHandler) GetKey

func (keyPairHandler *KTVpcKeyPairHandler) GetKey(keyIID irs.IID) (irs.KeyPairInfo, error)

func (*KTVpcKeyPairHandler) ListIID added in v0.9.6

func (keyPairHandler *KTVpcKeyPairHandler) ListIID() ([]*irs.IID, error)

func (*KTVpcKeyPairHandler) ListKey

func (keyPairHandler *KTVpcKeyPairHandler) ListKey() ([]*irs.KeyPairInfo, error)

type KTVpcMyImageHandler

type KTVpcMyImageHandler struct {
	RegionInfo    idrv.RegionInfo
	VMClient      *ktvpcsdk.ServiceClient
	ImageClient   *ktvpcsdk.ServiceClient
	NetworkClient *ktvpcsdk.ServiceClient
	VolumeClient  *ktvpcsdk.ServiceClient
}

func (*KTVpcMyImageHandler) CheckWindowsImage

func (myImageHandler *KTVpcMyImageHandler) CheckWindowsImage(myImageIID irs.IID) (bool, error)

func (*KTVpcMyImageHandler) DeleteMyImage

func (myImageHandler *KTVpcMyImageHandler) DeleteMyImage(myImageIID irs.IID) (bool, error)

func (*KTVpcMyImageHandler) GetMyImage

func (myImageHandler *KTVpcMyImageHandler) GetMyImage(myImageIID irs.IID) (irs.MyImageInfo, error)

func (*KTVpcMyImageHandler) ListIID added in v0.9.6

func (ImageHandler *KTVpcMyImageHandler) ListIID() ([]*irs.IID, error)

func (*KTVpcMyImageHandler) ListMyImage

func (myImageHandler *KTVpcMyImageHandler) ListMyImage() ([]*irs.MyImageInfo, error)

To Manage My Images

func (*KTVpcMyImageHandler) SnapshotVM

func (myImageHandler *KTVpcMyImageHandler) SnapshotVM(snapshotReqInfo irs.MyImageInfo) (irs.MyImageInfo, error)

To Take a Snapshot Root Volume with VM ID (To Create My Image)

type KTVpcNLBHandler

type KTVpcNLBHandler struct {
	RegionInfo    idrv.RegionInfo
	VMClient      *ktvpcsdk.ServiceClient
	NetworkClient *ktvpcsdk.ServiceClient
	NLBClient     *ktvpcsdk.ServiceClient
}

func (*KTVpcNLBHandler) AddVMs

func (nlbHandler *KTVpcNLBHandler) AddVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (irs.VMGroupInfo, error)

func (*KTVpcNLBHandler) ChangeHealthCheckerInfo

func (nlbHandler *KTVpcNLBHandler) ChangeHealthCheckerInfo(nlbIID irs.IID, healthChecker irs.HealthCheckerInfo) (irs.HealthCheckerInfo, error)

func (*KTVpcNLBHandler) ChangeListener

func (nlbHandler *KTVpcNLBHandler) ChangeListener(nlbIID irs.IID, listener irs.ListenerInfo) (irs.ListenerInfo, error)

------ Frontend Control

func (*KTVpcNLBHandler) ChangeVMGroupInfo

func (nlbHandler *KTVpcNLBHandler) ChangeVMGroupInfo(nlbIID irs.IID, vmGroup irs.VMGroupInfo) (irs.VMGroupInfo, error)

------ Backend Control

func (*KTVpcNLBHandler) CreateNLB

func (nlbHandler *KTVpcNLBHandler) CreateNLB(nlbReqInfo irs.NLBInfo) (createNLB irs.NLBInfo, newErr error)

func (*KTVpcNLBHandler) DeleteNLB

func (nlbHandler *KTVpcNLBHandler) DeleteNLB(nlbIID irs.IID) (bool, error)

func (*KTVpcNLBHandler) GetNLB

func (nlbHandler *KTVpcNLBHandler) GetNLB(nlbIID irs.IID) (irs.NLBInfo, error)

func (*KTVpcNLBHandler) GetVMGroupHealthInfo

func (nlbHandler *KTVpcNLBHandler) GetVMGroupHealthInfo(nlbIID irs.IID) (irs.HealthInfo, error)

func (*KTVpcNLBHandler) ListIID added in v0.9.6

func (NLBHandler *KTVpcNLBHandler) ListIID() ([]*irs.IID, error)

func (*KTVpcNLBHandler) ListNLB

func (nlbHandler *KTVpcNLBHandler) ListNLB() ([]*irs.NLBInfo, error)

func (*KTVpcNLBHandler) RemoveVMs

func (nlbHandler *KTVpcNLBHandler) RemoveVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (bool, error)

type KTVpcRegionZoneHandler

type KTVpcRegionZoneHandler struct {
	RegionInfo idrv.RegionInfo
}

func (KTVpcRegionZoneHandler) GetRegionZone

func (regionZoneHandler KTVpcRegionZoneHandler) GetRegionZone(regionCode string) (irs.RegionZoneInfo, error)

func (*KTVpcRegionZoneHandler) ListOrgRegion

func (regionZoneHandler *KTVpcRegionZoneHandler) ListOrgRegion() (string, error)

func (*KTVpcRegionZoneHandler) ListOrgZone

func (regionZoneHandler *KTVpcRegionZoneHandler) ListOrgZone() (string, error)

func (*KTVpcRegionZoneHandler) ListRegionZone

func (regionZoneHandler *KTVpcRegionZoneHandler) ListRegionZone() ([]*irs.RegionZoneInfo, error)

type KTVpcSecurityHandler

type KTVpcSecurityHandler struct {
	RegionInfo    idrv.RegionInfo
	VMClient      *ktvpcsdk.ServiceClient
	NetworkClient *ktvpcsdk.ServiceClient
}

func (*KTVpcSecurityHandler) AddRules

func (securityHandler *KTVpcSecurityHandler) AddRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (irs.SecurityInfo, error)

func (*KTVpcSecurityHandler) CreateSecurity

func (securityHandler *KTVpcSecurityHandler) CreateSecurity(securityReqInfo irs.SecurityReqInfo) (irs.SecurityInfo, error)

func (*KTVpcSecurityHandler) DeleteSecurity

func (securityHandler *KTVpcSecurityHandler) DeleteSecurity(securityIID irs.IID) (bool, error)

func (*KTVpcSecurityHandler) GetSecurity

func (securityHandler *KTVpcSecurityHandler) GetSecurity(securityIID irs.IID) (irs.SecurityInfo, error)

func (*KTVpcSecurityHandler) ListIID added in v0.9.6

func (securityHandler *KTVpcSecurityHandler) ListIID() ([]*irs.IID, error)

func (*KTVpcSecurityHandler) ListSecurity

func (securityHandler *KTVpcSecurityHandler) ListSecurity() ([]*irs.SecurityInfo, error)

func (*KTVpcSecurityHandler) RemoveRules

func (securityHandler *KTVpcSecurityHandler) RemoveRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (bool, error)

type KTVpcVMHandler

type KTVpcVMHandler struct {
	CredentialInfo idrv.CredentialInfo
	RegionInfo     idrv.RegionInfo
	VMClient       *ktvpcsdk.ServiceClient
	ImageClient    *ktvpcsdk.ServiceClient
	NetworkClient  *ktvpcsdk.ServiceClient
	VolumeClient   *ktvpcsdk.ServiceClient
}

func (*KTVpcVMHandler) GetVM

func (vmHandler *KTVpcVMHandler) GetVM(vmIID irs.IID) (irs.VMInfo, error)

func (*KTVpcVMHandler) GetVMStatus

func (vmHandler *KTVpcVMHandler) GetVMStatus(vmIID irs.IID) (irs.VMStatus, error)

func (*KTVpcVMHandler) ListIID added in v0.9.6

func (vmHandler *KTVpcVMHandler) ListIID() ([]*irs.IID, error)

func (*KTVpcVMHandler) ListVM

func (vmHandler *KTVpcVMHandler) ListVM() ([]*irs.VMInfo, error)

func (*KTVpcVMHandler) ListVMStatus

func (vmHandler *KTVpcVMHandler) ListVMStatus() ([]*irs.VMStatusInfo, error)

func (*KTVpcVMHandler) RebootVM

func (vmHandler *KTVpcVMHandler) RebootVM(vmIID irs.IID) (irs.VMStatus, error)

func (*KTVpcVMHandler) ResumeVM

func (vmHandler *KTVpcVMHandler) ResumeVM(vmIID irs.IID) (irs.VMStatus, error)

func (*KTVpcVMHandler) StartVM

func (vmHandler *KTVpcVMHandler) StartVM(vmReqInfo irs.VMReqInfo) (irs.VMInfo, error)

func (*KTVpcVMHandler) SuspendVM

func (vmHandler *KTVpcVMHandler) SuspendVM(vmIID irs.IID) (irs.VMStatus, error)

func (*KTVpcVMHandler) TerminateVM

func (vmHandler *KTVpcVMHandler) TerminateVM(vmIID irs.IID) (irs.VMStatus, error)

type KTVpcVMSpecHandler

type KTVpcVMSpecHandler struct {
	RegionInfo idrv.RegionInfo
	VMClient   *ktvpcsdk.ServiceClient
}

func (*KTVpcVMSpecHandler) GetOrgVMSpec

func (vmSpecHandler *KTVpcVMSpecHandler) GetOrgVMSpec(specName string) (string, error)

func (*KTVpcVMSpecHandler) GetVMSpec

func (vmSpecHandler *KTVpcVMSpecHandler) GetVMSpec(specName string) (irs.VMSpecInfo, error)

func (*KTVpcVMSpecHandler) ListOrgVMSpec

func (vmSpecHandler *KTVpcVMSpecHandler) ListOrgVMSpec() (string, error)

func (*KTVpcVMSpecHandler) ListVMSpec

func (vmSpecHandler *KTVpcVMSpecHandler) ListVMSpec() ([]*irs.VMSpecInfo, error)

type KTVpcVPCHandler

type KTVpcVPCHandler struct {
	RegionInfo    idrv.RegionInfo
	NetworkClient *ktvpcsdk.ServiceClient
}

func (*KTVpcVPCHandler) AddSubnet

func (vpcHandler *KTVpcVPCHandler) AddSubnet(vpcIID irs.IID, subnetReqInfo irs.SubnetInfo) (irs.VPCInfo, error)

func (*KTVpcVPCHandler) CreateVPC

func (vpcHandler *KTVpcVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.VPCInfo, error)

func (*KTVpcVPCHandler) DeleteVPC

func (vpcHandler *KTVpcVPCHandler) DeleteVPC(vpcIID irs.IID) (bool, error)

func (*KTVpcVPCHandler) GetSubnet

func (vpcHandler *KTVpcVPCHandler) GetSubnet(subnetIID irs.IID) (irs.SubnetInfo, error)

func (*KTVpcVPCHandler) GetVPC

func (vpcHandler *KTVpcVPCHandler) GetVPC(vpcIID irs.IID) (irs.VPCInfo, error)

func (*KTVpcVPCHandler) ListIID added in v0.9.6

func (vpcHandler *KTVpcVPCHandler) ListIID() ([]*irs.IID, error)

func (*KTVpcVPCHandler) ListVPC

func (vpcHandler *KTVpcVPCHandler) ListVPC() ([]*irs.VPCInfo, error)

func (*KTVpcVPCHandler) RemoveSubnet

func (vpcHandler *KTVpcVPCHandler) RemoveSubnet(vpcIID irs.IID, subnetIID irs.IID) (bool, error)

type KeyValue added in v0.9.6

type KeyValue struct {
	Key   string `json:"Key"`
	Value string `json:"Value"`
}

type KtVpcRegion

type KtVpcRegion struct {
	RegionCode string
	RegionName string
	ZoneList   []KtVpcZone
}

type KtVpcZone

type KtVpcZone struct {
	ZoneCode string
	ZoneName string
}

type NetworkInfo

type NetworkInfo struct {
	TierID     string
	PublicIP   string
	PublicIPID string
}

type NetworkWithExt

type NetworkWithExt struct {
	networks.Network
	external.NetworkExternalExt
}

type SecurityGroup

type SecurityGroup struct {
	IID           IId             `json:"IId"`
	VpcIID        VpcIId          `json:"VpcIID"`
	Direc         string          `json:"Direction"`
	Secu_Rules    []Security_Rule `json:"SecurityRules"`
	KeyValue_List []KeyValue      `json:"KeyValueList"`
}

type Security_Rule

type Security_Rule struct {
	FromPort string `json:"FromPort"`
	ToPort   string `json:"ToPort"`
	Protocol string `json:"IPProtocol"`
	Direc    string `json:"Direction"`
	Cidr     string `json:"CIDR"`
}

type VpcIId

type VpcIId struct {
	NameID   string `json:"NameId"`
	SystemID string `json:"SystemId"`
}

Directories

Path Synopsis
info_manager

Jump to

Keyboard shortcuts

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