Documentation ¶
Index ¶
- Constants
- Variables
- func CloneClusterInfo(srcInfo irs.ClusterInfo) irs.ClusterInfo
- func CloneClusterInfoList(srcInfoList []*irs.ClusterInfo) []*irs.ClusterInfo
- 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 CloneNodeGroupInfo(srcInfo irs.NodeGroupInfo) irs.NodeGroupInfo
- func CloneNodeGroupInfoList(srcInfoList []irs.NodeGroupInfo) []irs.NodeGroupInfo
- 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 GetGlobalViewTemplate(productFamily string) (irs.CloudPriceData, error)
- func PrepareRegionZone(mockName string)
- func PrepareVMImage(mockName string)
- func PrepareVMSpec(mockName string)
- type InstanceData
- type InstanceInfo
- type MockAnyCallHandler
- type MockClusterHandler
- func (clusterHandler *MockClusterHandler) AddNodeGroup(clusterIID irs.IID, nodeGroupReqInfo irs.NodeGroupInfo) (irs.NodeGroupInfo, error)
- func (clusterHandler *MockClusterHandler) ChangeNodeGroupScaling(clusterIID irs.IID, nodeGroupIID irs.IID, DesiredNodeSize int, MinNodeSize int, ...) (irs.NodeGroupInfo, error)
- func (clusterHandler *MockClusterHandler) CreateCluster(clusterReqInfo irs.ClusterInfo) (irs.ClusterInfo, error)
- func (clusterHandler *MockClusterHandler) DeleteCluster(iid irs.IID) (bool, error)
- func (clusterHandler *MockClusterHandler) GetCluster(iid irs.IID) (irs.ClusterInfo, error)
- func (clusterHandler *MockClusterHandler) ListCluster() ([]*irs.ClusterInfo, error)
- func (ClusterHandler *MockClusterHandler) ListIID() ([]*irs.IID, error)
- func (clusterHandler *MockClusterHandler) RemoveNodeGroup(clusterIID irs.IID, nodeGroupIID irs.IID) (bool, error)
- func (clusterHandler *MockClusterHandler) SetNodeGroupAutoScaling(clusterIID irs.IID, nodeGroupIID irs.IID, on bool) (bool, error)
- func (clusterHandler *MockClusterHandler) UpgradeCluster(clusterIID irs.IID, newVersion string) (irs.ClusterInfo, error)
- 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)
- func (DiskHandler *MockDiskHandler) ListIID() ([]*irs.IID, 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) ListIID() ([]*irs.IID, 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 (ImageHandler *MockMyImageHandler) ListIID() ([]*irs.IID, 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) ListIID() ([]*irs.IID, error)
- func (nlbHandler *MockNLBHandler) ListNLB() ([]*irs.NLBInfo, error)
- func (nlbHandler *MockNLBHandler) RemoveVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (bool, error)
- type MockPriceInfoHandler
- type MockRegionZoneHandler
- func (handler *MockRegionZoneHandler) GetRegionZone(Name string) (irs.RegionZoneInfo, error)
- func (handler *MockRegionZoneHandler) ListOrgRegion() (string, error)
- func (handler *MockRegionZoneHandler) ListOrgZone() (string, error)
- func (handler *MockRegionZoneHandler) ListRegionZone() ([]*irs.RegionZoneInfo, 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) ListIID() ([]*irs.IID, error)
- func (securityHandler *MockSecurityHandler) ListSecurity() ([]*irs.SecurityInfo, error)
- func (securityHandler *MockSecurityHandler) RemoveRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (bool, error)
- type MockTagHandler
- func (tagHandler *MockTagHandler) AddTag(resType irs.RSType, resIID irs.IID, tag irs.KeyValue) (irs.KeyValue, error)
- func (tagHandler *MockTagHandler) FindTag(resType irs.RSType, keyword string) ([]*irs.TagInfo, error)
- func (tagHandler *MockTagHandler) GetTag(resType irs.RSType, resIID irs.IID, key string) (irs.KeyValue, error)
- func (tagHandler *MockTagHandler) ListTag(resType irs.RSType, resIID irs.IID) ([]irs.KeyValue, error)
- func (tagHandler *MockTagHandler) RemoveTag(resType irs.RSType, resIID irs.IID, key string) (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) ListIID() ([]*irs.IID, 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) ListIID() ([]*irs.IID, error)
- func (vpcHandler *MockVPCHandler) ListVPC() ([]*irs.VPCInfo, error)
- func (vpcHandler *MockVPCHandler) RemoveSubnet(iid irs.IID, subnetIID irs.IID) (bool, error)
- type NLBData
- type NLBInfo
- type PayAsYouGo
- type PricingList
- type SavingPlan
- type StorageData
- type StorageInfo
Constants ¶
const ( COMPUTE_INSTANCE = "Compute Instance" STORAGE = "Storage" NETWORK_LOAD_BALANCER = "Network Load Balancer" )
Variables ¶
var PrepareImageInfoList []*irs.ImageInfo
Functions ¶
func CloneClusterInfo ¶ added in v0.9.2
func CloneClusterInfo(srcInfo irs.ClusterInfo) irs.ClusterInfo
func CloneClusterInfoList ¶ added in v0.9.2
func CloneClusterInfoList(srcInfoList []*irs.ClusterInfo) []*irs.ClusterInfo
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 CloneNodeGroupInfo ¶ added in v0.9.2
func CloneNodeGroupInfo(srcInfo irs.NodeGroupInfo) irs.NodeGroupInfo
func CloneNodeGroupInfoList ¶ added in v0.9.2
func CloneNodeGroupInfoList(srcInfoList []irs.NodeGroupInfo) []irs.NodeGroupInfo
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 GetGlobalViewTemplate ¶ added in v0.8.1
func GetGlobalViewTemplate(productFamily string) (irs.CloudPriceData, error)
func PrepareRegionZone ¶ added in v0.7.6
func PrepareRegionZone(mockName string)
Be called before using the User function. Called in MockDriver
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 InstanceData ¶ added in v0.8.1
type InstanceData struct { Category string `json:"category"` InstanceName string `json:"instanceName"` InstanceInfo InstanceInfo `json:"instanceInfo"` PricingList PricingList `json:"pricingList"` }
==================================================== ------- vm instance struct for price info
type InstanceInfo ¶ added in v0.8.1
type InstanceInfo struct { RegionName string `json:"regionName"` InstanceType string `json:"instanceType"` Vcpu string `json:"vcpu"` Clock string `json:"clock"` Memory string `json:"memory"` Storage string `json:"storage"` ProcessorArchitecture string `json:"processorArchitecture"` Os string `json:"os"` ProcessorFeatures string `json:"processorFeatures"` }
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 MockClusterHandler ¶ added in v0.9.2
type MockClusterHandler struct {
MockName string
}
func (*MockClusterHandler) AddNodeGroup ¶ added in v0.9.2
func (clusterHandler *MockClusterHandler) AddNodeGroup(clusterIID irs.IID, nodeGroupReqInfo irs.NodeGroupInfo) (irs.NodeGroupInfo, error)
func (*MockClusterHandler) ChangeNodeGroupScaling ¶ added in v0.9.2
func (*MockClusterHandler) CreateCluster ¶ added in v0.9.2
func (clusterHandler *MockClusterHandler) CreateCluster(clusterReqInfo irs.ClusterInfo) (irs.ClusterInfo, error)
(1) create clusterInfo object (2) insert clusterInfo into global Map
func (*MockClusterHandler) DeleteCluster ¶ added in v0.9.2
func (clusterHandler *MockClusterHandler) DeleteCluster(iid irs.IID) (bool, error)
func (*MockClusterHandler) GetCluster ¶ added in v0.9.2
func (clusterHandler *MockClusterHandler) GetCluster(iid irs.IID) (irs.ClusterInfo, error)
func (*MockClusterHandler) ListCluster ¶ added in v0.9.2
func (clusterHandler *MockClusterHandler) ListCluster() ([]*irs.ClusterInfo, error)
func (*MockClusterHandler) ListIID ¶ added in v0.9.6
func (ClusterHandler *MockClusterHandler) ListIID() ([]*irs.IID, error)
func (*MockClusterHandler) RemoveNodeGroup ¶ added in v0.9.2
func (*MockClusterHandler) SetNodeGroupAutoScaling ¶ added in v0.9.2
func (*MockClusterHandler) UpgradeCluster ¶ added in v0.9.2
func (clusterHandler *MockClusterHandler) UpgradeCluster(clusterIID irs.IID, newVersion string) (irs.ClusterInfo, error)
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) ListIID ¶ added in v0.9.6
func (keyPairHandler *MockKeyPairHandler) ListIID() ([]*irs.IID, 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) ListIID ¶ added in v0.9.6
func (ImageHandler *MockMyImageHandler) ListIID() ([]*irs.IID, 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)
func (*MockNLBHandler) ListIID ¶ added in v0.9.6
func (NLBHandler *MockNLBHandler) ListIID() ([]*irs.IID, error)
type MockPriceInfoHandler ¶ added in v0.8.1
type MockPriceInfoHandler struct { Region idrv.RegionInfo MockName string }
func (*MockPriceInfoHandler) GetPriceInfo ¶ added in v0.8.1
func (handler *MockPriceInfoHandler) GetPriceInfo(productFamily string, regionName string, filterList []irs.KeyValue) (string, error)
1. Get the Mock's price info from product price info files
- by getMockPriceInfo()
2. transform csp price info to Spider price info(Global view) with filter processing
- by transformPriceInfo() -> transformToProductInfo() -> checkFilters() -> transformToPriceInfo() -> checkFilters() -> make cloudPrice.PriceList info -> make global json for result string
3. return Spider price info
func (*MockPriceInfoHandler) ListProductFamily ¶ added in v0.8.1
func (handler *MockPriceInfoHandler) ListProductFamily(regionName string) ([]string, error)
type MockRegionZoneHandler ¶ added in v0.7.6
type MockRegionZoneHandler struct { Region idrv.RegionInfo MockName string }
func (*MockRegionZoneHandler) GetRegionZone ¶ added in v0.7.6
func (handler *MockRegionZoneHandler) GetRegionZone(Name string) (irs.RegionZoneInfo, error)
func (*MockRegionZoneHandler) ListOrgRegion ¶ added in v0.7.6
func (handler *MockRegionZoneHandler) ListOrgRegion() (string, error)
ListOrgRegion implements resources.RegionZoneHandler.
func (*MockRegionZoneHandler) ListOrgZone ¶ added in v0.7.6
func (handler *MockRegionZoneHandler) ListOrgZone() (string, error)
ListOrgZone implements resources.RegionZoneHandler.
func (*MockRegionZoneHandler) ListRegionZone ¶ added in v0.7.6
func (handler *MockRegionZoneHandler) ListRegionZone() ([]*irs.RegionZoneInfo, 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) ListIID ¶ added in v0.9.6
func (securityHandler *MockSecurityHandler) ListIID() ([]*irs.IID, 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 MockTagHandler ¶ added in v0.9.2
type MockTagHandler struct {
MockName string
}
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) ListIID ¶ added in v0.9.6
func (vmHandler *MockVMHandler) ListIID() ([]*irs.IID, 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) 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) ListIID ¶ added in v0.9.6
func (vpcHandler *MockVPCHandler) ListIID() ([]*irs.IID, error)
func (*MockVPCHandler) ListVPC ¶
func (vpcHandler *MockVPCHandler) ListVPC() ([]*irs.VPCInfo, error)
func (*MockVPCHandler) RemoveSubnet ¶
type NLBData ¶ added in v0.8.1
type NLBData struct { Category string `json:"category"` NLBName string `json:"nlbName"` NLBInfo NLBInfo `json:"nlbInfo"` PricingList PricingList `json:"pricingList"` }
------- load balancer struct for price info
type PayAsYouGo ¶ added in v0.8.1
type PricingList ¶ added in v0.8.1
type PricingList struct { PayAsYouGo PayAsYouGo `json:"payAsYouGo"` SavingPlan []SavingPlan `json:"savingPlan"` }
------- common struct for price info
type SavingPlan ¶ added in v0.8.1
type StorageData ¶ added in v0.8.1
type StorageData struct { Category string `json:"category"` StorageName string `json:"storageName"` StorageInfo StorageInfo `json:"storageInfo"` PricingList PricingList `json:"pricingList"` }
------- storage struct for price info