resources

package
v0.3.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrepareImageInfoList []*irs.ImageInfo
View Source
var PrepareVMSpecInfoList []*irs.VMSpecInfo

Functions

func CloneSecurityInfo added in v0.3.3

func CloneSecurityInfo(srcInfo irs.SecurityInfo) irs.SecurityInfo

func CloneSecurityInfoList added in v0.3.3

func CloneSecurityInfoList(srcInfoList []*irs.SecurityInfo) []*irs.SecurityInfo

func PrepareVMImage added in v0.2.8

func PrepareVMImage(mockName string)

Be called before using the User function. Called in MockDriver

func PrepareVMSpec added in v0.2.8

func PrepareVMSpec(mockName string)

Be called before using the User function. Called in MockDriver

Types

type MockImageHandler

type MockImageHandler struct {
	MockName string
}

func (*MockImageHandler) CreateImage

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

(1) create imageInfo object (2) insert ImageInfo into global Map

func (*MockImageHandler) DeleteImage

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

func (*MockImageHandler) GetImage

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

func (*MockImageHandler) ListImage

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

type MockKeyPairHandler

type MockKeyPairHandler struct {
	MockName string
}

func (*MockKeyPairHandler) CreateKey

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

(1) create keyPairInfo object (2) insert keyPairInfo into global Map

func (*MockKeyPairHandler) DeleteKey

func (keyPairHandler *MockKeyPairHandler) DeleteKey(iid irs.IID) (bool, error)

func (*MockKeyPairHandler) GetKey

func (keyPairHandler *MockKeyPairHandler) GetKey(iid irs.IID) (irs.KeyPairInfo, error)

func (*MockKeyPairHandler) ListKey

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

type MockSecurityHandler

type MockSecurityHandler struct {
	MockName string
}

func (*MockSecurityHandler) CreateSecurity

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

(1) create securityInfo object (2) insert securityInfo into global Map

func (*MockSecurityHandler) DeleteSecurity

func (securityHandler *MockSecurityHandler) DeleteSecurity(iid irs.IID) (bool, error)

func (*MockSecurityHandler) GetSecurity

func (securityHandler *MockSecurityHandler) GetSecurity(iid irs.IID) (irs.SecurityInfo, error)

func (*MockSecurityHandler) ListSecurity

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

type MockVMHandler added in v0.2.8

type MockVMHandler struct {
	Region   idrv.RegionInfo
	MockName string
}

func (*MockVMHandler) GetVM added in v0.2.8

func (vmHandler *MockVMHandler) GetVM(iid irs.IID) (irs.VMInfo, error)

func (*MockVMHandler) GetVMStatus added in v0.2.8

func (vmHandler *MockVMHandler) GetVMStatus(iid irs.IID) (irs.VMStatus, error)

func (*MockVMHandler) ListVM added in v0.2.8

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

func (*MockVMHandler) ListVMStatus added in v0.2.8

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

func (*MockVMHandler) RebootVM added in v0.2.8

func (vmHandler *MockVMHandler) RebootVM(iid irs.IID) (irs.VMStatus, error)

func (*MockVMHandler) ResumeVM added in v0.2.8

func (vmHandler *MockVMHandler) ResumeVM(iid irs.IID) (irs.VMStatus, error)

func (*MockVMHandler) StartVM added in v0.2.8

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

func (*MockVMHandler) SuspendVM added in v0.2.8

func (vmHandler *MockVMHandler) SuspendVM(iid irs.IID) (irs.VMStatus, error)

func (*MockVMHandler) TerminateVM added in v0.2.8

func (vmHandler *MockVMHandler) TerminateVM(iid irs.IID) (irs.VMStatus, error)

type MockVMSpecHandler

type MockVMSpecHandler struct {
	MockName string
}

func (*MockVMSpecHandler) GetOrgVMSpec

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

func (*MockVMSpecHandler) GetVMSpec

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

func (*MockVMSpecHandler) ListOrgVMSpec

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

func (*MockVMSpecHandler) ListVMSpec

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

type MockVPCHandler

type MockVPCHandler struct {
	MockName string
}

func (*MockVPCHandler) AddSubnet

func (vpcHandler *MockVPCHandler) AddSubnet(iid irs.IID, subnetInfo irs.SubnetInfo) (irs.VPCInfo, error)

func (*MockVPCHandler) CreateVPC

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

(1) create vpcInfo object (2) insert vpcInfo into global Map

func (*MockVPCHandler) DeleteVPC

func (vpcHandler *MockVPCHandler) DeleteVPC(iid irs.IID) (bool, error)

func (*MockVPCHandler) GetVPC

func (vpcHandler *MockVPCHandler) GetVPC(iid irs.IID) (irs.VPCInfo, error)

func (*MockVPCHandler) ListVPC

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

func (*MockVPCHandler) RemoveSubnet

func (vpcHandler *MockVPCHandler) RemoveSubnet(iid 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