resources

package
v0.0.0-...-8fc61e2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CBVMUser      = "cb-user"
	CBKeyPairPath = "/cloud-driver-libs/.ssh-cloudit/"
)
View Source
const (
	SecurityGroup = "SECURITYGROUP"
	NULL          = ""
	DefaultCIDR   = "0.0.0.0/0"
	DefaultPort   = "0"
)
View Source
const (
	VMDefaultUser         = "root"
	VMDefaultPassword     = "qwe1212!Q"
	SSHDefaultUser        = "cb-user"
	SSHDefaultPort        = 22
	VM                    = "VM"
	DefaultSGName         = "ALL"
	ExtraInboundRuleName  = "extra-inbound"
	ExtraOutboundRuleName = "extra-outbound"
	InboundRule           = "inbound"
	OutboundRule          = "outbound"
)
View Source
const (
	Image = "IMAGE"
)
View Source
const (
	KeyPair = "KEYPAIR"
)
View Source
const (
	VMSpec = "VMSPEC"
)
View Source
const (
	VPC = "VPC"
)

Variables

This section is empty.

Functions

func CreateHashString

func CreateHashString(credentialInfo idrv.CredentialInfo) (string, error)

KeyPair 해시 생성 함수

func GetCallLogScheme

func GetCallLogScheme(endpoint string, resourceType call.RES_TYPE, resourceName string, apiName string) call.CLOUDLOGSCHEMA

func GetPublicKey

func GetPublicKey(credentialInfo idrv.CredentialInfo, keyPairName string) (string, error)

Public KeyPair 정보 가져오기

func GetSSHClient

func GetSSHClient(serverIp string, serverPort int, username string, password string) (scp.Client, error)

func GetVMSpecByName

func GetVMSpecByName(authHeader map[string]string, reqClient *client.RestClient, specName string) (*string, error)

VM Spec 정보 조회

func InitLog

func InitLog()

func ListVNic

func ListVNic(authHeader map[string]string, reqClient *client.RestClient, vmId string) (*[]nic.VmNicInfo, error)

VNic 목록 조회

func LoggingError

func LoggingError(hiscallInfo call.CLOUDLOGSCHEMA, err error)

func LoggingInfo

func LoggingInfo(hiscallInfo call.CLOUDLOGSCHEMA, start time.Time)

func RunCommand

func RunCommand(serverIp string, serverPort int, username string, password string, command string) (string, error)

Types

type ClouditImageHandler

type ClouditImageHandler struct {
	CredentialInfo idrv.CredentialInfo
	Client         *client.RestClient
}

func (*ClouditImageHandler) CreateImage

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

func (*ClouditImageHandler) DeleteImage

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

func (*ClouditImageHandler) GetImage

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

func (*ClouditImageHandler) ListImage

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

type ClouditKeyPairHandler

type ClouditKeyPairHandler struct {
	CredentialInfo idrv.CredentialInfo
	Client         *client.RestClient
}

func (*ClouditKeyPairHandler) CheckKeyPairFolder

func (keyPairHandler *ClouditKeyPairHandler) CheckKeyPairFolder(folderPath string) error

func (*ClouditKeyPairHandler) CreateKey

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

func (*ClouditKeyPairHandler) DeleteKey

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

func (*ClouditKeyPairHandler) GetKey

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

func (*ClouditKeyPairHandler) ListKey

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

type ClouditSecurityHandler

type ClouditSecurityHandler struct {
	CredentialInfo idrv.CredentialInfo
	Client         *client.RestClient
}

func (*ClouditSecurityHandler) CreateSecurity

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

func (*ClouditSecurityHandler) DeleteSecurity

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

func (*ClouditSecurityHandler) GetSecurity

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

func (*ClouditSecurityHandler) ListSecurity

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

type ClouditVMHandler

type ClouditVMHandler struct {
	CredentialInfo idrv.CredentialInfo
	Client         *client.RestClient
}

func (*ClouditVMHandler) AssociatePublicIP

func (vmHandler *ClouditVMHandler) AssociatePublicIP(vmName string, vmIp string) (bool, error)

VM에 PublicIP 연결

func (*ClouditVMHandler) DisassociatePublicIP

func (vmHandler *ClouditVMHandler) DisassociatePublicIP(publicIP string) (bool, error)

VM에 PublicIP 해제

func (*ClouditVMHandler) GetVM

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

func (*ClouditVMHandler) GetVMStatus

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

func (*ClouditVMHandler) ListVM

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

func (*ClouditVMHandler) ListVMStatus

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

func (*ClouditVMHandler) RebootVM

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

func (*ClouditVMHandler) ResumeVM

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

func (*ClouditVMHandler) StartVM

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

func (*ClouditVMHandler) SuspendVM

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

func (*ClouditVMHandler) TerminateVM

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

type ClouditVMSpecHandler

type ClouditVMSpecHandler struct {
	CredentialInfo idrv.CredentialInfo
	Client         *client.RestClient
}

func (*ClouditVMSpecHandler) GetOrgVMSpec

func (vmSpecHandler *ClouditVMSpecHandler) GetOrgVMSpec(Region string, Name string) (string, error)

func (*ClouditVMSpecHandler) GetVMSpec

func (vmSpecHandler *ClouditVMSpecHandler) GetVMSpec(Region string, Name string) (irs.VMSpecInfo, error)

func (*ClouditVMSpecHandler) GetVMSpecByName

func (vmSpecHandler *ClouditVMSpecHandler) GetVMSpecByName(region string, specName string) (*irs.VMSpecInfo, error)

func (*ClouditVMSpecHandler) ListOrgVMSpec

func (vmSpecHandler *ClouditVMSpecHandler) ListOrgVMSpec(Region string) (string, error)

func (*ClouditVMSpecHandler) ListVMSpec

func (vmSpecHandler *ClouditVMSpecHandler) ListVMSpec(Region string) ([]*irs.VMSpecInfo, error)

type ClouditVPCHandler

type ClouditVPCHandler struct {
	CredentialInfo idrv.CredentialInfo
	Client         *client.RestClient
}

func (*ClouditVPCHandler) AddSubnet

func (vpcHandler *ClouditVPCHandler) AddSubnet(vpcIID irs.IID, subnetInfo irs.SubnetInfo) (irs.VPCInfo, error)

func (*ClouditVPCHandler) CreateSubnet

func (vpcHandler *ClouditVPCHandler) CreateSubnet(subnetReqInfo irs.SubnetInfo) (subnet.SubnetInfo, error)

func (*ClouditVPCHandler) CreateVPC

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

func (*ClouditVPCHandler) DeleteSubnet

func (vpcHandler *ClouditVPCHandler) DeleteSubnet(subnetIId irs.IID) (bool, error)

func (*ClouditVPCHandler) DeleteVPC

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

func (*ClouditVPCHandler) GetSubnet

func (vpcHandler *ClouditVPCHandler) GetSubnet(subnetIId irs.IID) (subnet.SubnetInfo, error)

func (*ClouditVPCHandler) GetVPC

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

func (*ClouditVPCHandler) ListSubnet

func (vpcHandler *ClouditVPCHandler) ListSubnet() ([]subnet.SubnetInfo, error)

func (*ClouditVPCHandler) ListVPC

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

func (*ClouditVPCHandler) RemoveSubnet

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

Jump to

Keyboard shortcuts

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