resources

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CBResourceGroupName  = "CB-GROUP"
	CBVirutalNetworkName = "CB-VNet"
	CBVnetDefaultCidr    = "130.0.0.0/16"
	CBVMUser             = "cb-user"
	// by powerkim, 2019.10.30
	CBKeyPairPath = "/cloud-driver-libs/.ssh-azure/"
)
View Source
const (
	ICMP          = "icmp"
	SecurityGroup = "SECURITYGROUP"
)
View Source
const (
	ProvisioningStateCode string = "ProvisioningState/succeeded"
	VM                           = "VM"
)
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 CreatePublicIP added in v0.1.3

func CreatePublicIP(vmHandler *AzureVMHandler, vmReqInfo irs.VMReqInfo) (irs.IID, error)

VM 생성 시 Public IP 자동 생성 (nested flow 적용)

func CreateVNic

func CreateVNic(vmHandler *AzureVMHandler, vmReqInfo irs.VMReqInfo, publicIPIId irs.IID) (irs.IID, error)

VM 생성 시 VNic 자동 생성 (nested flow 적용)

func DeletePublicIP added in v0.1.3

func DeletePublicIP(vmHandler *AzureVMHandler, vmInfo irs.VMInfo) (irs.VMStatus, error)

VM 삭제 시 Public IP 자동 삭제 (nested flow 적용)

func DeleteVMDisk added in v0.1.3

func DeleteVMDisk(vmHandler *AzureVMHandler, osDiskName string) (irs.VMStatus, error)

VM 삭제 시 VM Disk 자동 삭제 (nested flow 적용)

func DeleteVNic added in v0.1.3

func DeleteVNic(vmHandler *AzureVMHandler, vmInfo irs.VMInfo) (irs.VMStatus, error)

VM 삭제 시 VNic 자동 삭제 (nested flow 적용)

func DetachVNic added in v0.1.3

func DetachVNic(vmHandler *AzureVMHandler, vmInfo irs.VMInfo) (irs.VMStatus, error)

VNic 삭제 전 PublicIP 연결 해제

func GetCallLogScheme added in v0.2.1

func GetCallLogScheme(region idrv.RegionInfo, resourceType call.RES_TYPE, resourceName string, apiName string) call.CLOUDLOGSCHEMA

func GetPublicIPIdByName

func GetPublicIPIdByName(credentialInfo idrv.CredentialInfo, regionInfo idrv.RegionInfo, publicIPName string) string

func GetPublicKey

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

Public KeyPair 정보 가져오기

func GetSecGroupIdByName

func GetSecGroupIdByName(credentialInfo idrv.CredentialInfo, regionInfo idrv.RegionInfo, secGroupName string) string

func GetVNicIdByName

func GetVNicIdByName(credentialInfo idrv.CredentialInfo, regionInfo idrv.RegionInfo, vNicName string) string

func InitLog added in v0.2.1

func InitLog()

func LoggingError added in v0.2.1

func LoggingError(hiscallInfo call.CLOUDLOGSCHEMA, err error)

func LoggingInfo added in v0.2.1

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

Types

type AzureImageHandler

type AzureImageHandler struct {
	Region        idrv.RegionInfo
	Ctx           context.Context
	Client        *compute.ImagesClient
	VMImageClient *compute.VirtualMachineImagesClient
}

func (*AzureImageHandler) CreateImage

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

func (*AzureImageHandler) DeleteImage

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

func (*AzureImageHandler) GetImage

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

func (*AzureImageHandler) ListImage

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

type AzureKeyPairHandler

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

func (*AzureKeyPairHandler) CheckKeyPairFolder added in v0.2.1

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

func (*AzureKeyPairHandler) CreateKey

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

func (*AzureKeyPairHandler) DeleteKey

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

func (*AzureKeyPairHandler) GetKey

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

func (*AzureKeyPairHandler) ListKey

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

type AzureSecurityHandler

type AzureSecurityHandler struct {
	Region idrv.RegionInfo
	Ctx    context.Context
	Client *network.SecurityGroupsClient
}

func (*AzureSecurityHandler) CreateSecurity

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

func (*AzureSecurityHandler) DeleteSecurity

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

func (*AzureSecurityHandler) GetSecurity

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

func (*AzureSecurityHandler) ListSecurity

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

type AzureVMHandler

type AzureVMHandler struct {
	CredentialInfo idrv.CredentialInfo
	Region         idrv.RegionInfo
	Ctx            context.Context
	Client         *compute.VirtualMachinesClient
	SubnetClient   *network.SubnetsClient
	NicClient      *network.InterfacesClient
	PublicIPClient *network.PublicIPAddressesClient
	DiskClient     *compute.DisksClient
}

func (*AzureVMHandler) GetVM

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

func (*AzureVMHandler) GetVMStatus

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

func (*AzureVMHandler) ListVM

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

func (*AzureVMHandler) ListVMStatus

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

func (*AzureVMHandler) RebootVM

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

func (*AzureVMHandler) ResumeVM

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

func (*AzureVMHandler) StartVM

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

func (*AzureVMHandler) SuspendVM

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

func (*AzureVMHandler) TerminateVM

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

type AzureVPCHandler added in v0.1.3

type AzureVPCHandler struct {
	Region       idrv.RegionInfo
	Ctx          context.Context
	Client       *network.VirtualNetworksClient
	SubnetClient *network.SubnetsClient
}

func (*AzureVPCHandler) AddSubnet added in v0.2.1

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

func (*AzureVPCHandler) CreateVPC added in v0.1.3

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

func (*AzureVPCHandler) DeleteVPC added in v0.1.3

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

func (*AzureVPCHandler) GetVPC added in v0.1.3

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

func (*AzureVPCHandler) ListVPC added in v0.1.3

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

func (*AzureVPCHandler) RemoveSubnet added in v0.2.1

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

type AzureVmSpecHandler

type AzureVmSpecHandler struct {
	Region idrv.RegionInfo
	Ctx    context.Context
	Client *compute.VirtualMachineSizesClient
}

func (*AzureVmSpecHandler) GetOrgVMSpec

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

func (*AzureVmSpecHandler) GetVMSpec

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

func (*AzureVmSpecHandler) ListOrgVMSpec

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

func (*AzureVmSpecHandler) ListVMSpec

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

Jump to

Keyboard shortcuts

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