Documentation ¶
Index ¶
- Variables
- func CloneKeyPairInfo(srcInfo irs.KeyPairInfo) irs.KeyPairInfo
- func CloneKeyPairInfoList(srcInfoList []*irs.KeyPairInfo) []*irs.KeyPairInfo
- func CloneSecurityInfo(srcInfo irs.SecurityInfo) irs.SecurityInfo
- func CloneSecurityInfoList(srcInfoList []*irs.SecurityInfo) []*irs.SecurityInfo
- func CloneSubnetInfo(srcInfo irs.SubnetInfo) irs.SubnetInfo
- func CloneSubnetInfoList(srcInfoList []irs.SubnetInfo) []irs.SubnetInfo
- func CloneVMInfo(srcInfo irs.VMInfo) irs.VMInfo
- func CloneVMInfoList(srcInfoList []*irs.VMInfo) []*irs.VMInfo
- func CloneVMStatusInfo(srcInfo irs.VMStatusInfo) irs.VMStatusInfo
- func CloneVMStatusInfoList(srcInfoList []*irs.VMStatusInfo) []*irs.VMStatusInfo
- func CloneVPCInfo(srcInfo irs.VPCInfo) irs.VPCInfo
- func CloneVPCInfoList(srcInfoList []*irs.VPCInfo) []*irs.VPCInfo
- func PrepareVMImage(mockName string)
- func PrepareVMSpec(mockName string)
- type MockImageHandler
- func (imageHandler *MockImageHandler) CreateImage(imageReqInfo irs.ImageReqInfo) (irs.ImageInfo, error)
- func (imageHandler *MockImageHandler) DeleteImage(imageIID irs.IID) (bool, error)
- func (imageHandler *MockImageHandler) GetImage(imageIID irs.IID) (irs.ImageInfo, error)
- func (imageHandler *MockImageHandler) ListImage() ([]*irs.ImageInfo, error)
- type MockKeyPairHandler
- func (keyPairHandler *MockKeyPairHandler) CreateKey(keyPairReqInfo irs.KeyPairReqInfo) (irs.KeyPairInfo, error)
- func (keyPairHandler *MockKeyPairHandler) DeleteKey(iid irs.IID) (bool, error)
- func (keyPairHandler *MockKeyPairHandler) GetKey(iid irs.IID) (irs.KeyPairInfo, error)
- func (keyPairHandler *MockKeyPairHandler) ListKey() ([]*irs.KeyPairInfo, error)
- type MockSecurityHandler
- func (securityHandler *MockSecurityHandler) CreateSecurity(securityReqInfo irs.SecurityReqInfo) (irs.SecurityInfo, error)
- func (securityHandler *MockSecurityHandler) DeleteSecurity(iid irs.IID) (bool, error)
- func (securityHandler *MockSecurityHandler) GetSecurity(iid irs.IID) (irs.SecurityInfo, error)
- func (securityHandler *MockSecurityHandler) ListSecurity() ([]*irs.SecurityInfo, error)
- type MockVMHandler
- func (vmHandler *MockVMHandler) GetVM(iid irs.IID) (irs.VMInfo, error)
- func (vmHandler *MockVMHandler) GetVMStatus(iid irs.IID) (irs.VMStatus, error)
- func (vmHandler *MockVMHandler) ListVM() ([]*irs.VMInfo, error)
- func (vmHandler *MockVMHandler) ListVMStatus() ([]*irs.VMStatusInfo, error)
- func (vmHandler *MockVMHandler) RebootVM(iid irs.IID) (irs.VMStatus, error)
- func (vmHandler *MockVMHandler) ResumeVM(iid irs.IID) (irs.VMStatus, error)
- func (vmHandler *MockVMHandler) StartVM(vmReqInfo irs.VMReqInfo) (irs.VMInfo, error)
- func (vmHandler *MockVMHandler) SuspendVM(iid irs.IID) (irs.VMStatus, error)
- func (vmHandler *MockVMHandler) TerminateVM(iid irs.IID) (irs.VMStatus, error)
- type MockVMSpecHandler
- func (vmSpecHandler *MockVMSpecHandler) GetOrgVMSpec(Region string, Name string) (string, error)
- func (vmSpecHandler *MockVMSpecHandler) GetVMSpec(Region string, Name string) (irs.VMSpecInfo, error)
- func (vmSpecHandler *MockVMSpecHandler) ListOrgVMSpec(Region string) (string, error)
- func (vmSpecHandler *MockVMSpecHandler) ListVMSpec(Region string) ([]*irs.VMSpecInfo, error)
- type MockVPCHandler
- func (vpcHandler *MockVPCHandler) AddSubnet(iid irs.IID, subnetInfo irs.SubnetInfo) (irs.VPCInfo, error)
- func (vpcHandler *MockVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.VPCInfo, error)
- func (vpcHandler *MockVPCHandler) DeleteVPC(iid irs.IID) (bool, error)
- func (vpcHandler *MockVPCHandler) GetVPC(iid irs.IID) (irs.VPCInfo, error)
- func (vpcHandler *MockVPCHandler) ListVPC() ([]*irs.VPCInfo, error)
- func (vpcHandler *MockVPCHandler) RemoveSubnet(iid irs.IID, subnetIID irs.IID) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var PrepareImageInfoList []*irs.ImageInfo
View Source
var PrepareVMSpecInfoList []*irs.VMSpecInfo
Functions ¶
func CloneKeyPairInfo ¶ added in v0.4.11
func CloneKeyPairInfo(srcInfo irs.KeyPairInfo) irs.KeyPairInfo
func CloneKeyPairInfoList ¶ added in v0.4.11
func CloneKeyPairInfoList(srcInfoList []*irs.KeyPairInfo) []*irs.KeyPairInfo
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 CloneSubnetInfo ¶ added in v0.4.11
func CloneSubnetInfo(srcInfo irs.SubnetInfo) irs.SubnetInfo
func CloneSubnetInfoList ¶ added in v0.4.11
func CloneSubnetInfoList(srcInfoList []irs.SubnetInfo) []irs.SubnetInfo
func CloneVMInfoList ¶ added in v0.4.11
func CloneVMStatusInfo ¶ added in v0.4.11
func CloneVMStatusInfo(srcInfo irs.VMStatusInfo) irs.VMStatusInfo
func CloneVMStatusInfoList ¶ added in v0.4.11
func CloneVMStatusInfoList(srcInfoList []*irs.VMStatusInfo) []*irs.VMStatusInfo
func CloneVPCInfoList ¶ added in v0.4.11
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)
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) GetVMStatus ¶ added in v0.2.8
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) TerminateVM ¶ added in v0.2.8
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) ListVPC ¶
func (vpcHandler *MockVPCHandler) ListVPC() ([]*irs.VPCInfo, error)
func (*MockVPCHandler) RemoveSubnet ¶
Click to show internal directories.
Click to hide internal directories.