Documentation ¶
Index ¶
- Variables
- func CloneDiskInfo(srcInfo irs.DiskInfo) irs.DiskInfo
- func CloneDiskInfoList(srcInfoList []*irs.DiskInfo) []*irs.DiskInfo
- func CloneHealthCheckerInfo(srcInfo irs.HealthCheckerInfo) irs.HealthCheckerInfo
- func CloneKeyPairInfo(srcInfo irs.KeyPairInfo) irs.KeyPairInfo
- func CloneKeyPairInfoList(srcInfoList []*irs.KeyPairInfo) []*irs.KeyPairInfo
- func CloneListenerInfo(srcInfo irs.ListenerInfo) irs.ListenerInfo
- func CloneMyImageInfo(srcInfo irs.MyImageInfo) irs.MyImageInfo
- func CloneMyImageInfoList(srcInfoList []*irs.MyImageInfo) []*irs.MyImageInfo
- func CloneNLBInfo(srcInfo irs.NLBInfo) irs.NLBInfo
- func CloneNLBInfoList(srcInfoList []*irs.NLBInfo) []*irs.NLBInfo
- 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 CloneVMGroupInfo(srcInfo irs.VMGroupInfo) irs.VMGroupInfo
- 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 CloneVMs(srcInfo *[]irs.IID) *[]irs.IID
- func CloneVPCInfo(srcInfo irs.VPCInfo) irs.VPCInfo
- func CloneVPCInfoList(srcInfoList []*irs.VPCInfo) []*irs.VPCInfo
- func PrepareVMImage(mockName string)
- func PrepareVMSpec(mockName string)
- type MockAnyCallHandler
- type MockDiskHandler
- func (diskHandler *MockDiskHandler) AttachDisk(diskIID irs.IID, ownerVM irs.IID) (irs.DiskInfo, error)
- func (diskHandler *MockDiskHandler) ChangeDiskSize(iid irs.IID, size string) (bool, error)
- func (diskHandler *MockDiskHandler) CreateDisk(diskReqInfo irs.DiskInfo) (irs.DiskInfo, error)
- func (diskHandler *MockDiskHandler) DeleteDisk(iid irs.IID) (bool, error)
- func (diskHandler *MockDiskHandler) DetachDisk(diskIID irs.IID, ownerVM irs.IID) (bool, error)
- func (diskHandler *MockDiskHandler) GetDisk(iid irs.IID) (irs.DiskInfo, error)
- func (diskHandler *MockDiskHandler) ListDisk() ([]*irs.DiskInfo, error)
- type MockImageHandler
- func (imageHandler *MockImageHandler) CheckWindowsImage(imageIID irs.IID) (bool, error)
- 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 MockMyImageHandler
- func (myImageHandler *MockMyImageHandler) CheckWindowsImage(iid irs.IID) (bool, error)
- func (myImageHandler *MockMyImageHandler) DeleteMyImage(iid irs.IID) (bool, error)
- func (myImageHandler *MockMyImageHandler) GetMyImage(iid irs.IID) (irs.MyImageInfo, error)
- func (myImageHandler *MockMyImageHandler) ListMyImage() ([]*irs.MyImageInfo, error)
- func (myImageHandler *MockMyImageHandler) SnapshotVM(myImageReqInfo irs.MyImageInfo) (irs.MyImageInfo, error)
- type MockNLBHandler
- func (nlbHandler *MockNLBHandler) AddVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (irs.VMGroupInfo, error)
- func (nlbHandler *MockNLBHandler) ChangeHealthCheckerInfo(nlbIID irs.IID, healthChecker irs.HealthCheckerInfo) (irs.HealthCheckerInfo, error)
- func (nlbHandler *MockNLBHandler) ChangeListener(nlbIID irs.IID, listener irs.ListenerInfo) (irs.ListenerInfo, error)
- func (nlbHandler *MockNLBHandler) ChangeVMGroupInfo(nlbIID irs.IID, vmGroup irs.VMGroupInfo) (irs.VMGroupInfo, error)
- func (nlbHandler *MockNLBHandler) CreateNLB(nlbInfo irs.NLBInfo) (irs.NLBInfo, error)
- func (nlbHandler *MockNLBHandler) DeleteNLB(iid irs.IID) (bool, error)
- func (nlbHandler *MockNLBHandler) GetNLB(iid irs.IID) (irs.NLBInfo, error)
- func (nlbHandler *MockNLBHandler) GetVMGroupHealthInfo(nlbIID irs.IID) (irs.HealthInfo, error)
- func (nlbHandler *MockNLBHandler) ListNLB() ([]*irs.NLBInfo, error)
- func (nlbHandler *MockNLBHandler) RemoveVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (bool, error)
- type MockSecurityHandler
- func (securityHandler *MockSecurityHandler) AddRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (irs.SecurityInfo, error)
- 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)
- func (securityHandler *MockSecurityHandler) RemoveRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (bool, 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(Name string) (string, error)
- func (vmSpecHandler *MockVMSpecHandler) GetVMSpec(Name string) (irs.VMSpecInfo, error)
- func (vmSpecHandler *MockVMSpecHandler) ListOrgVMSpec() (string, error)
- func (vmSpecHandler *MockVMSpecHandler) ListVMSpec() ([]*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 ¶
var PrepareImageInfoList []*irs.ImageInfo
Functions ¶
func CloneDiskInfoList ¶ added in v0.6.7
func CloneHealthCheckerInfo ¶ added in v0.5.11
func CloneHealthCheckerInfo(srcInfo irs.HealthCheckerInfo) irs.HealthCheckerInfo
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 CloneListenerInfo ¶ added in v0.5.11
func CloneListenerInfo(srcInfo irs.ListenerInfo) irs.ListenerInfo
func CloneMyImageInfo ¶ added in v0.6.12
func CloneMyImageInfo(srcInfo irs.MyImageInfo) irs.MyImageInfo
func CloneMyImageInfoList ¶ added in v0.6.12
func CloneMyImageInfoList(srcInfoList []*irs.MyImageInfo) []*irs.MyImageInfo
func CloneNLBInfoList ¶ added in v0.5.10
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 CloneVMGroupInfo ¶ added in v0.5.11
func CloneVMGroupInfo(srcInfo irs.VMGroupInfo) irs.VMGroupInfo
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 MockAnyCallHandler ¶ added in v0.6.9
type MockAnyCallHandler struct {
MockName string
}
func (*MockAnyCallHandler) AnyCall ¶ added in v0.6.9
func (anyCallHandler *MockAnyCallHandler) AnyCall(callInfo irs.AnyCallInfo) (irs.AnyCallInfo, error)
*******************************************************
// call example curl -sX POST http://localhost:1024/spider/anycall -H 'Content-Type: application/json' -d \ '{ "ConnectionName" : "mock-config01", "ReqInfo" : { "FID" : "countAll", "IKeyValueList" : [{"Key":"rsType", "Value":"vpc"}] } }' | json_pp
*******************************************************
type MockDiskHandler ¶ added in v0.6.7
type MockDiskHandler struct {
MockName string
}
func (*MockDiskHandler) AttachDisk ¶ added in v0.6.7
func (*MockDiskHandler) ChangeDiskSize ¶ added in v0.6.7
func (*MockDiskHandler) CreateDisk ¶ added in v0.6.7
(1) create diskInfo object (2) insert diskInfo into global Map
func (*MockDiskHandler) DeleteDisk ¶ added in v0.6.7
func (diskHandler *MockDiskHandler) DeleteDisk(iid irs.IID) (bool, error)
func (*MockDiskHandler) DetachDisk ¶ added in v0.6.7
type MockImageHandler ¶
type MockImageHandler struct {
MockName string
}
func (*MockImageHandler) CheckWindowsImage ¶ added in v0.6.15
func (imageHandler *MockImageHandler) CheckWindowsImage(imageIID irs.IID) (bool, error)
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 MockMyImageHandler ¶ added in v0.6.12
type MockMyImageHandler struct {
MockName string
}
func (*MockMyImageHandler) CheckWindowsImage ¶ added in v0.6.15
func (myImageHandler *MockMyImageHandler) CheckWindowsImage(iid irs.IID) (bool, error)
func (*MockMyImageHandler) DeleteMyImage ¶ added in v0.6.12
func (myImageHandler *MockMyImageHandler) DeleteMyImage(iid irs.IID) (bool, error)
func (*MockMyImageHandler) GetMyImage ¶ added in v0.6.12
func (myImageHandler *MockMyImageHandler) GetMyImage(iid irs.IID) (irs.MyImageInfo, error)
func (*MockMyImageHandler) ListMyImage ¶ added in v0.6.12
func (myImageHandler *MockMyImageHandler) ListMyImage() ([]*irs.MyImageInfo, error)
func (*MockMyImageHandler) SnapshotVM ¶ added in v0.6.12
func (myImageHandler *MockMyImageHandler) SnapshotVM(myImageReqInfo irs.MyImageInfo) (irs.MyImageInfo, error)
(1) create myImageInfo object (2) insert myImageInfo into global Map
type MockNLBHandler ¶ added in v0.5.10
type MockNLBHandler struct {
MockName string
}
func (*MockNLBHandler) AddVMs ¶ added in v0.5.10
func (nlbHandler *MockNLBHandler) AddVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (irs.VMGroupInfo, error)
func (*MockNLBHandler) ChangeHealthCheckerInfo ¶ added in v0.5.10
func (nlbHandler *MockNLBHandler) ChangeHealthCheckerInfo(nlbIID irs.IID, healthChecker irs.HealthCheckerInfo) (irs.HealthCheckerInfo, error)
func (*MockNLBHandler) ChangeListener ¶ added in v0.5.10
func (nlbHandler *MockNLBHandler) ChangeListener(nlbIID irs.IID, listener irs.ListenerInfo) (irs.ListenerInfo, error)
------ Frontend Control
func (*MockNLBHandler) ChangeVMGroupInfo ¶ added in v0.5.10
func (nlbHandler *MockNLBHandler) ChangeVMGroupInfo(nlbIID irs.IID, vmGroup irs.VMGroupInfo) (irs.VMGroupInfo, error)
------ Backend Control
func (*MockNLBHandler) DeleteNLB ¶ added in v0.5.10
func (nlbHandler *MockNLBHandler) DeleteNLB(iid irs.IID) (bool, error)
func (*MockNLBHandler) GetVMGroupHealthInfo ¶ added in v0.5.10
func (nlbHandler *MockNLBHandler) GetVMGroupHealthInfo(nlbIID irs.IID) (irs.HealthInfo, error)
type MockSecurityHandler ¶
type MockSecurityHandler struct {
MockName string
}
func (*MockSecurityHandler) AddRules ¶ added in v0.5.4
func (securityHandler *MockSecurityHandler) AddRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (irs.SecurityInfo, error)
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)
func (*MockSecurityHandler) RemoveRules ¶ added in v0.5.4
func (securityHandler *MockSecurityHandler) RemoveRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (bool, 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(Name string) (string, error)
func (*MockVMSpecHandler) GetVMSpec ¶
func (vmSpecHandler *MockVMSpecHandler) GetVMSpec(Name string) (irs.VMSpecInfo, error)
func (*MockVMSpecHandler) ListOrgVMSpec ¶
func (vmSpecHandler *MockVMSpecHandler) ListOrgVMSpec() (string, error)
func (*MockVMSpecHandler) ListVMSpec ¶
func (vmSpecHandler *MockVMSpecHandler) ListVMSpec() ([]*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)