resources

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CBVMUser = "cscservice"
	//CBKeyPairPath = "/cloud-control-manager/cloud-driver/driver-libs/.ssh-gcp/"
	// by powerkim, 2019.10.30
	CBKeyPairPath = "/cloud-driver-libs/.ssh-gcp/"
)
View Source
const CBDefaultSubnetName string = "cb-vnet" // CB Default Subnet Name
View Source
const CBDefaultVNetName string = "cb-vnet" // CB Default Virtual Network Name

Variables

This section is empty.

Functions

func CheckMachineType

func CheckMachineType(Name string) bool

func ConvertVMStatusString

func ConvertVMStatusString(vmStatus string) (irs.VMStatus, error)

func CreateHashString

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

KeyPair 해시 생성 함수

func GetCBDefaultSubnetName

func GetCBDefaultSubnetName() string

Subnet

func GetCBDefaultVNetName

func GetCBDefaultVNetName() string

VPC

func GetKeyValueList

func GetKeyValueList(i map[string]interface{}) []irs.KeyValue

func GetPublicKey

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

Public KeyPair 정보 가져오기

Types

type GCPImageHandler

type GCPImageHandler struct {
	Region     idrv.RegionInfo
	Ctx        context.Context
	Client     *compute.Service
	Credential idrv.CredentialInfo
}

func (*GCPImageHandler) CreateImage

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

func (*GCPImageHandler) DeleteImage

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

func (*GCPImageHandler) GetImage

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

func (*GCPImageHandler) ListImage

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

type GCPKeyPairHandler

type GCPKeyPairHandler struct {
	CredentialInfo idrv.CredentialInfo
	Region         idrv.RegionInfo
}

func (*GCPKeyPairHandler) CreateKey

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

func (*GCPKeyPairHandler) DeleteKey

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

func (*GCPKeyPairHandler) GetKey

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

func (*GCPKeyPairHandler) ListKey

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

type GCPSecurityHandler

type GCPSecurityHandler struct {
	Region     idrv.RegionInfo
	Ctx        context.Context
	Client     *compute.Service
	Credential idrv.CredentialInfo
}

func (*GCPSecurityHandler) CreateSecurity

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

@TODO : 이슈

func (*GCPSecurityHandler) DeleteSecurity

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

func (*GCPSecurityHandler) GetSecurity

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

func (*GCPSecurityHandler) ListSecurity

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

type GCPVMHandler

type GCPVMHandler struct {
	Region     idrv.RegionInfo
	Ctx        context.Context
	Client     *compute.Service
	Credential idrv.CredentialInfo
}

func (*GCPVMHandler) GetVM

func (vmHandler *GCPVMHandler) GetVM(vmID irs.IID) (irs.VMInfo, error)

func (*GCPVMHandler) GetVMStatus

func (vmHandler *GCPVMHandler) GetVMStatus(vmID irs.IID) (irs.VMStatus, error)

func (*GCPVMHandler) ListVM

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

func (*GCPVMHandler) ListVMStatus

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

func (*GCPVMHandler) RebootVM

func (vmHandler *GCPVMHandler) RebootVM(vmID irs.IID) (irs.VMStatus, error)

func (*GCPVMHandler) ResumeVM

func (vmHandler *GCPVMHandler) ResumeVM(vmID irs.IID) (irs.VMStatus, error)

func (*GCPVMHandler) StartVM

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

func (*GCPVMHandler) SuspendVM

func (vmHandler *GCPVMHandler) SuspendVM(vmID irs.IID) (irs.VMStatus, error)

stop이라고 보면 될듯

func (*GCPVMHandler) TerminateVM

func (vmHandler *GCPVMHandler) TerminateVM(vmID irs.IID) (irs.VMStatus, error)

type GCPVMSpecHandler

type GCPVMSpecHandler struct {
	Region     idrv.RegionInfo
	Ctx        context.Context
	Client     *compute.Service
	Credential idrv.CredentialInfo
}

func (*GCPVMSpecHandler) GetOrgVMSpec

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

func (*GCPVMSpecHandler) GetVMSpec

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

func (*GCPVMSpecHandler) ListOrgVMSpec

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

func (*GCPVMSpecHandler) ListVMSpec

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

type GCPVPCHandler added in v0.1.3

type GCPVPCHandler struct {
	Region     idrv.RegionInfo
	Ctx        context.Context
	Client     *compute.Service
	Credential idrv.CredentialInfo
}

func (*GCPVPCHandler) CreateVPC added in v0.1.3

func (vVPCHandler *GCPVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.VPCInfo, error)

@TODO : VPC 생성 로직 변경 필요 / 서브넷이 백그라운드로 생성되기 때문에 조회 시 모두 생성될 때까지 대기하는 로직 필요(그렇지 않으면 일부 정보가 누락됨)

func (*GCPVPCHandler) DeleteVPC added in v0.1.3

func (vVPCHandler *GCPVPCHandler) DeleteVPC(vpcID irs.IID) (bool, error)

func (*GCPVPCHandler) GetVPC added in v0.1.3

func (vVPCHandler *GCPVPCHandler) GetVPC(vpcIID irs.IID) (irs.VPCInfo, error)

func (*GCPVPCHandler) ListVPC added in v0.1.3

func (vVPCHandler *GCPVPCHandler) ListVPC() ([]*irs.VPCInfo, error)

type GcpCBNetworkInfo

type GcpCBNetworkInfo struct {
	VpcName   string
	VpcId     string
	CidrBlock string
	IsDefault bool
	State     string

	SubnetName string
	SubnetId   string
}

Jump to

Keyboard shortcuts

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