Documentation
¶
Index ¶
- Constants
- func CheckFolder(folderPath string) error
- func CheckFolderAndCreate(folderPath string) error
- func ConvertJsonString(v interface{}) (string, error)
- func ConvertVMStatus(vmStatus string) (irs.VMStatus, error)
- func ConvertVMStatusToString(vmStatus string) (string, error)
- func GetCallLogScheme(zone string, resourceType call.RES_TYPE, resourceName string, apiName string) call.CLOUDLOGSCHEMA
- func GetKTVMSpecIdAndDiskSize(instanceSpecId string) (string, string, string)
- func InitLog()
- func LoggingError(hiscallInfo call.CLOUDLOGSCHEMA, err error)
- func LoggingInfo(hiscallInfo call.CLOUDLOGSCHEMA, start time.Time)
- func MappingImageInfo(ktServerProductType ktsdk.ProductTypes) irs.ImageInfo
- func MappingKeyPairInfo(KtCloudKeyPair ktsdk.KeyPair) irs.KeyPairInfo
- func MappingVMSpecInfo(ZoneId string, ImageId string, ktServerProductType ktsdk.ProductTypes) irs.VMSpecInfo
- func RunCommand(cmdName string, cmdArgs []string) (string, error)
- func String(n int32) string
- type IId
- type KeyValue
- type KtCloudImageHandler
- func (imageHandler *KtCloudImageHandler) CheckWindowsImage(imageIID irs.IID) (bool, error)
- func (imageHandler *KtCloudImageHandler) CreateImage(imageReqInfo irs.ImageReqInfo) (irs.ImageInfo, error)
- func (imageHandler *KtCloudImageHandler) DeleteImage(imageIID irs.IID) (bool, error)
- func (imageHandler *KtCloudImageHandler) GetImage(imageIID irs.IID) (irs.ImageInfo, error)
- func (imageHandler *KtCloudImageHandler) ListImage() ([]*irs.ImageInfo, error)
- type KtCloudKeyPairHandler
- func (keyPairHandler *KtCloudKeyPairHandler) CreateKey(keyPairReqInfo irs.KeyPairReqInfo) (irs.KeyPairInfo, error)
- func (keyPairHandler *KtCloudKeyPairHandler) DeleteKey(keyIID irs.IID) (bool, error)
- func (keyPairHandler *KtCloudKeyPairHandler) GetKey(keyIID irs.IID) (irs.KeyPairInfo, error)
- func (keyPairHandler *KtCloudKeyPairHandler) ListKey() ([]*irs.KeyPairInfo, error)
- type KtCloudRegionZoneHandler
- func (regionZoneHandler KtCloudRegionZoneHandler) GetRegionZone(regionCode string) (irs.RegionZoneInfo, error)
- func (regionZoneHandler *KtCloudRegionZoneHandler) ListOrgRegion() (string, error)
- func (regionZoneHandler *KtCloudRegionZoneHandler) ListOrgZone() (string, error)
- func (regionZoneHandler *KtCloudRegionZoneHandler) ListRegionZone() ([]*irs.RegionZoneInfo, error)
- type KtCloudSecurityHandler
- func (securityHandler *KtCloudSecurityHandler) AddRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (irs.SecurityInfo, error)
- func (securityHandler *KtCloudSecurityHandler) CreateSecurity(securityReqInfo irs.SecurityReqInfo) (irs.SecurityInfo, error)
- func (securityHandler *KtCloudSecurityHandler) DeleteSecurity(securityIID irs.IID) (bool, error)
- func (securityHandler *KtCloudSecurityHandler) GetSecurity(securityIID irs.IID) (irs.SecurityInfo, error)
- func (securityHandler *KtCloudSecurityHandler) ListSecurity() ([]*irs.SecurityInfo, error)
- func (securityHandler *KtCloudSecurityHandler) MappingSecurityInfo(secuGroup SecurityGroup) (irs.SecurityInfo, error)
- func (securityHandler *KtCloudSecurityHandler) RemoveRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (bool, error)
- type KtCloudVMHandler
- func (vmHandler *KtCloudVMHandler) AssociateIpAddress() (string, error)
- func (vmHandler *KtCloudVMHandler) CreatePortForwardingFirewallRules(sgSystemIDs []string, publicIpId string, vmID string) (bool, error)
- func (vmHandler *KtCloudVMHandler) DeleteFirewall(publicIpId string) (irs.VMStatus, error)
- func (vmHandler *KtCloudVMHandler) DeletePortForwarding(publicIpId string) (irs.VMStatus, error)
- func (vmHandler *KtCloudVMHandler) DisassociatePublicIp(publicIpId string) (irs.VMStatus, error)
- func (vmHandler *KtCloudVMHandler) GetIPFromPortForwardingRules(instanceId string) (string, error)
- func (vmHandler *KtCloudVMHandler) GetSGListFromTags(instanceId string) ([]irs.IID, error)
- func (vmHandler *KtCloudVMHandler) GetSubnetFromTags(instanceId string) (string, error)
- func (vmHandler *KtCloudVMHandler) GetVM(vmIID irs.IID) (irs.VMInfo, error)
- func (vmHandler *KtCloudVMHandler) GetVMSpecFromTags(instanceId string) (string, error)
- func (vmHandler *KtCloudVMHandler) GetVMStatus(vmIID irs.IID) (irs.VMStatus, error)
- func (vmHandler *KtCloudVMHandler) GetVPCFromTags(instanceId string) (string, error)
- func (vmHandler *KtCloudVMHandler) GetVmIdByName(vmNameID string) (string, error)
- func (vmHandler *KtCloudVMHandler) ListVM() ([]*irs.VMInfo, error)
- func (vmHandler *KtCloudVMHandler) ListVMStatus() ([]*irs.VMStatusInfo, error)
- func (vmHandler *KtCloudVMHandler) MappingServerInfo(KtCloudInstance ktsdk.Virtualmachine) (irs.VMInfo, error)
- func (vmHandler *KtCloudVMHandler) RebootVM(vmIID irs.IID) (irs.VMStatus, error)
- func (vmHandler *KtCloudVMHandler) ResumeVM(vmIID irs.IID) (irs.VMStatus, error)
- func (vmHandler *KtCloudVMHandler) StartVM(vmReqInfo irs.VMReqInfo) (irs.VMInfo, error)
- func (vmHandler *KtCloudVMHandler) SuspendVM(vmIID irs.IID) (irs.VMStatus, error)
- func (vmHandler *KtCloudVMHandler) TerminateVM(vmIID irs.IID) (irs.VMStatus, error)
- func (vmHandler *KtCloudVMHandler) WaitToGetInfo(vmIID irs.IID) (irs.VMStatus, error)
- type KtCloudVMSpecHandler
- func (vmSpecHandler *KtCloudVMSpecHandler) GetOrgVMSpec(Name string) (string, error)
- func (vmSpecHandler *KtCloudVMSpecHandler) GetVMSpec(VMSpecName string) (irs.VMSpecInfo, error)
- func (vmSpecHandler *KtCloudVMSpecHandler) ListOrgVMSpec() (string, error)
- func (vmSpecHandler *KtCloudVMSpecHandler) ListVMSpec() ([]*irs.VMSpecInfo, error)
- type KtCloudVPCHandler
- func (VPCHandler *KtCloudVPCHandler) AddSubnet(vpcIID irs.IID, subnetInfo irs.SubnetInfo) (irs.VPCInfo, error)
- func (VPCHandler *KtCloudVPCHandler) CreateSubnet(subnetReqInfo irs.SubnetInfo) (irs.SubnetInfo, error)
- func (VPCHandler *KtCloudVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.VPCInfo, error)
- func (VPCHandler *KtCloudVPCHandler) DeleteVPC(vpcIID irs.IID) (bool, error)
- func (VPCHandler *KtCloudVPCHandler) GetVPC(vpcIID irs.IID) (irs.VPCInfo, error)
- func (VPCHandler *KtCloudVPCHandler) ListVPC() ([]*irs.VPCInfo, error)
- func (VPCHandler *KtCloudVPCHandler) MappingVPCInfo(vpcFileInfo VPCFileInfo) (irs.VPCInfo, error)
- func (VPCHandler *KtCloudVPCHandler) RemoveSubnet(vpcIID irs.IID, subnetIID irs.IID) (bool, error)
- type KtRegionInfo
- type SecurityGroup
- type Security_Rule
- type Subnet
- type VPCFileInfo
- type VpcIId
Constants ¶
View Source
const ( API_v1 string = "https://api.ucloudbiz.olleh.com/server/v1/client/api" API_v2 string = "https://api.ucloudbiz.olleh.com/server/v2/client/api" // When Zone is 'KOR-Seoul M2' => uses API v2 )
Variables ¶
This section is empty.
Functions ¶
func CheckFolder ¶
func CheckFolderAndCreate ¶
func ConvertJsonString ¶
Cloud Object를 JSON String 타입으로 변환
func ConvertVMStatusToString ¶
func GetCallLogScheme ¶
func LoggingError ¶
func LoggingError(hiscallInfo call.CLOUDLOGSCHEMA, err error)
func LoggingInfo ¶
func LoggingInfo(hiscallInfo call.CLOUDLOGSCHEMA, start time.Time)
func MappingImageInfo ¶
func MappingImageInfo(ktServerProductType ktsdk.ProductTypes) irs.ImageInfo
func MappingKeyPairInfo ¶
func MappingKeyPairInfo(KtCloudKeyPair ktsdk.KeyPair) irs.KeyPairInfo
KeyPair 정보를 추출함
func MappingVMSpecInfo ¶
func MappingVMSpecInfo(ZoneId string, ImageId string, ktServerProductType ktsdk.ProductTypes) irs.VMSpecInfo
Extract instance Specification information
Types ¶
type KtCloudImageHandler ¶
type KtCloudImageHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo Client *ktsdk.KtCloudClient }
func (*KtCloudImageHandler) CheckWindowsImage ¶
func (imageHandler *KtCloudImageHandler) CheckWindowsImage(imageIID irs.IID) (bool, error)
func (*KtCloudImageHandler) CreateImage ¶
func (imageHandler *KtCloudImageHandler) CreateImage(imageReqInfo irs.ImageReqInfo) (irs.ImageInfo, error)
func (*KtCloudImageHandler) DeleteImage ¶
func (imageHandler *KtCloudImageHandler) DeleteImage(imageIID irs.IID) (bool, error)
type KtCloudKeyPairHandler ¶
type KtCloudKeyPairHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo Client *ktsdk.KtCloudClient }
func (*KtCloudKeyPairHandler) CreateKey ¶
func (keyPairHandler *KtCloudKeyPairHandler) CreateKey(keyPairReqInfo irs.KeyPairReqInfo) (irs.KeyPairInfo, error)
func (*KtCloudKeyPairHandler) DeleteKey ¶
func (keyPairHandler *KtCloudKeyPairHandler) DeleteKey(keyIID irs.IID) (bool, error)
func (*KtCloudKeyPairHandler) GetKey ¶
func (keyPairHandler *KtCloudKeyPairHandler) GetKey(keyIID irs.IID) (irs.KeyPairInfo, error)
func (*KtCloudKeyPairHandler) ListKey ¶
func (keyPairHandler *KtCloudKeyPairHandler) ListKey() ([]*irs.KeyPairInfo, error)
type KtCloudRegionZoneHandler ¶
type KtCloudRegionZoneHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo Client *ktsdk.KtCloudClient }
func (KtCloudRegionZoneHandler) GetRegionZone ¶
func (regionZoneHandler KtCloudRegionZoneHandler) GetRegionZone(regionCode string) (irs.RegionZoneInfo, error)
func (*KtCloudRegionZoneHandler) ListOrgRegion ¶
func (regionZoneHandler *KtCloudRegionZoneHandler) ListOrgRegion() (string, error)
func (*KtCloudRegionZoneHandler) ListOrgZone ¶
func (regionZoneHandler *KtCloudRegionZoneHandler) ListOrgZone() (string, error)
func (*KtCloudRegionZoneHandler) ListRegionZone ¶
func (regionZoneHandler *KtCloudRegionZoneHandler) ListRegionZone() ([]*irs.RegionZoneInfo, error)
type KtCloudSecurityHandler ¶
type KtCloudSecurityHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo Client *ktsdk.KtCloudClient }
func (*KtCloudSecurityHandler) AddRules ¶
func (securityHandler *KtCloudSecurityHandler) AddRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (irs.SecurityInfo, error)
func (*KtCloudSecurityHandler) CreateSecurity ¶
func (securityHandler *KtCloudSecurityHandler) CreateSecurity(securityReqInfo irs.SecurityReqInfo) (irs.SecurityInfo, error)
func (*KtCloudSecurityHandler) DeleteSecurity ¶
func (securityHandler *KtCloudSecurityHandler) DeleteSecurity(securityIID irs.IID) (bool, error)
func (*KtCloudSecurityHandler) GetSecurity ¶
func (securityHandler *KtCloudSecurityHandler) GetSecurity(securityIID irs.IID) (irs.SecurityInfo, error)
func (*KtCloudSecurityHandler) ListSecurity ¶
func (securityHandler *KtCloudSecurityHandler) ListSecurity() ([]*irs.SecurityInfo, error)
func (*KtCloudSecurityHandler) MappingSecurityInfo ¶
func (securityHandler *KtCloudSecurityHandler) MappingSecurityInfo(secuGroup SecurityGroup) (irs.SecurityInfo, error)
func (*KtCloudSecurityHandler) RemoveRules ¶
func (securityHandler *KtCloudSecurityHandler) RemoveRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (bool, error)
type KtCloudVMHandler ¶
type KtCloudVMHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo Client *ktsdk.KtCloudClient }
func (*KtCloudVMHandler) AssociateIpAddress ¶
func (vmHandler *KtCloudVMHandler) AssociateIpAddress() (string, error)
func (*KtCloudVMHandler) CreatePortForwardingFirewallRules ¶
func (vmHandler *KtCloudVMHandler) CreatePortForwardingFirewallRules(sgSystemIDs []string, publicIpId string, vmID string) (bool, error)
### To Apply 'PortForwarding Rules' and 'Firewall Rules' to the Public IP ID.
func (*KtCloudVMHandler) DeleteFirewall ¶
func (vmHandler *KtCloudVMHandler) DeleteFirewall(publicIpId string) (irs.VMStatus, error)
Whenever a VM is terminated, Delete the Firewall rules that the PublicIP has first.
func (*KtCloudVMHandler) DeletePortForwarding ¶
func (vmHandler *KtCloudVMHandler) DeletePortForwarding(publicIpId string) (irs.VMStatus, error)
Whenever a VM is terminated, Delete the PortForwarding rule that the PublicIP has.
func (*KtCloudVMHandler) DisassociatePublicIp ¶
func (vmHandler *KtCloudVMHandler) DisassociatePublicIp(publicIpId string) (irs.VMStatus, error)
Whenever a VM is terminated, Delete the PortForwarding rule that the PublicIP has.
func (*KtCloudVMHandler) GetIPFromPortForwardingRules ¶
func (vmHandler *KtCloudVMHandler) GetIPFromPortForwardingRules(instanceId string) (string, error)
func (*KtCloudVMHandler) GetSGListFromTags ¶
func (vmHandler *KtCloudVMHandler) GetSGListFromTags(instanceId string) ([]irs.IID, error)
func (*KtCloudVMHandler) GetSubnetFromTags ¶
func (vmHandler *KtCloudVMHandler) GetSubnetFromTags(instanceId string) (string, error)
func (*KtCloudVMHandler) GetVMSpecFromTags ¶
func (vmHandler *KtCloudVMHandler) GetVMSpecFromTags(instanceId string) (string, error)
func (*KtCloudVMHandler) GetVMStatus ¶
func (*KtCloudVMHandler) GetVPCFromTags ¶
func (vmHandler *KtCloudVMHandler) GetVPCFromTags(instanceId string) (string, error)
func (*KtCloudVMHandler) GetVmIdByName ¶
func (vmHandler *KtCloudVMHandler) GetVmIdByName(vmNameID string) (string, error)
func (*KtCloudVMHandler) ListVM ¶
func (vmHandler *KtCloudVMHandler) ListVM() ([]*irs.VMInfo, error)
func (*KtCloudVMHandler) ListVMStatus ¶
func (vmHandler *KtCloudVMHandler) ListVMStatus() ([]*irs.VMStatusInfo, error)
func (*KtCloudVMHandler) MappingServerInfo ¶
func (vmHandler *KtCloudVMHandler) MappingServerInfo(KtCloudInstance ktsdk.Virtualmachine) (irs.VMInfo, error)
func (*KtCloudVMHandler) TerminateVM ¶
func (*KtCloudVMHandler) WaitToGetInfo ¶
Waiting for up to 300 seconds until VM info. can be get
type KtCloudVMSpecHandler ¶
type KtCloudVMSpecHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo Client *ktsdk.KtCloudClient }
func (*KtCloudVMSpecHandler) GetOrgVMSpec ¶
func (vmSpecHandler *KtCloudVMSpecHandler) GetOrgVMSpec(Name string) (string, error)
func (*KtCloudVMSpecHandler) GetVMSpec ¶
func (vmSpecHandler *KtCloudVMSpecHandler) GetVMSpec(VMSpecName string) (irs.VMSpecInfo, error)
func (*KtCloudVMSpecHandler) ListOrgVMSpec ¶
func (vmSpecHandler *KtCloudVMSpecHandler) ListOrgVMSpec() (string, error)
func (*KtCloudVMSpecHandler) ListVMSpec ¶
func (vmSpecHandler *KtCloudVMSpecHandler) ListVMSpec() ([]*irs.VMSpecInfo, error)
type KtCloudVPCHandler ¶
type KtCloudVPCHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo Client *ktsdk.KtCloudClient }
func (*KtCloudVPCHandler) AddSubnet ¶
func (VPCHandler *KtCloudVPCHandler) AddSubnet(vpcIID irs.IID, subnetInfo irs.SubnetInfo) (irs.VPCInfo, error)
func (*KtCloudVPCHandler) CreateSubnet ¶
func (VPCHandler *KtCloudVPCHandler) CreateSubnet(subnetReqInfo irs.SubnetInfo) (irs.SubnetInfo, error)
func (*KtCloudVPCHandler) CreateVPC ¶
func (VPCHandler *KtCloudVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.VPCInfo, error)
func (*KtCloudVPCHandler) DeleteVPC ¶
func (VPCHandler *KtCloudVPCHandler) DeleteVPC(vpcIID irs.IID) (bool, error)
func (*KtCloudVPCHandler) ListVPC ¶
func (VPCHandler *KtCloudVPCHandler) ListVPC() ([]*irs.VPCInfo, error)
func (*KtCloudVPCHandler) MappingVPCInfo ¶
func (VPCHandler *KtCloudVPCHandler) MappingVPCInfo(vpcFileInfo VPCFileInfo) (irs.VPCInfo, error)
func (*KtCloudVPCHandler) RemoveSubnet ¶
type KtRegionInfo ¶
type SecurityGroup ¶
type SecurityGroup struct { IID IId `json:"IId"` VpcIID VpcIId `json:"VpcIID"` Direc string `json:"Direction"` Secu_Rules []Security_Rule `json:"SecurityRules"` }
type Security_Rule ¶
type VPCFileInfo ¶
Click to show internal directories.
Click to hide internal directories.