Documentation ¶
Index ¶
- Constants
- func CheckAdditionalLabels(node *v1.Node, vm *prismClientV3.VMIntentResponse)
- func CreatePrismCentralCluster(clusterName string) *prismClientV3.ClusterIntentResponse
- func GenerateMockConfig() config.Config
- func ValidateInstanceMetadata(metadata *cloudprovider.InstanceMetadata, vm *prismClientV3.VMIntentResponse, ...)
- type MockClient
- type MockEnvironment
- func (m *MockEnvironment) AddCluster(cluster *prismClientV3.ClusterIntentResponse) *prismClientV3.ClusterIntentResponse
- func (m *MockEnvironment) DeleteCluster(clusterUUID string)
- func (m *MockEnvironment) GetCluster(ctx context.Context, clusterName string) *prismClientV3.ClusterIntentResponse
- func (m *MockEnvironment) GetNode(nodeName string) *v1.Node
- func (m *MockEnvironment) GetVM(ctx context.Context, vmName string) *prismClientV3.VMIntentResponse
- type MockPrism
- func (mp *MockPrism) GetCluster(ctx context.Context, clusterUUID string) (*prismClientV3.ClusterIntentResponse, error)
- func (mp *MockPrism) GetVM(ctx context.Context, vmUUID string) (*prismClientV3.VMIntentResponse, error)
- func (mp *MockPrism) ListAllCluster(ctx context.Context, filter string) (*prismClientV3.ClusterListIntentResponse, error)
Constants ¶
View Source
const ( MockIP = "1.1.1.1" MockCluster = "mock-cluster" MockPrismCentral = "mock-pc" MockRegion = "mock-region" MockZone = "mock-zone" MockDefaultRegion = "region" MockDefaultZone = "zone" MockVMNamePoweredOn = "mock-vm-poweredon" MockVMNamePoweredOff = "mock-vm-poweredoff" MockVMNameCategories = "mock-vm-categories" MockVMNameNoAddresses = "mock-vm-no-addresses" MockVMNameFilteredNodeAddresses = "mock-vm-filtered-node-addresses" MockVMNamePoweredOnClusterCategories = "mock-vm-poweredon-cluster-categories" MockNodeNameVMNotExisting = "mock-node-no-vm-exists" MockNodeNameNoSystemUUID = "mock-node-no-system-uuid" )
Variables ¶
This section is empty.
Functions ¶
func CheckAdditionalLabels ¶
func CheckAdditionalLabels(node *v1.Node, vm *prismClientV3.VMIntentResponse)
func CreatePrismCentralCluster ¶
func CreatePrismCentralCluster(clusterName string) *prismClientV3.ClusterIntentResponse
func GenerateMockConfig ¶
func ValidateInstanceMetadata ¶
func ValidateInstanceMetadata(metadata *cloudprovider.InstanceMetadata, vm *prismClientV3.VMIntentResponse, region, zone string)
Types ¶
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock implementation of the interfaces.Client interface
func CreateMockClient ¶
func CreateMockClient(mockEnvironment MockEnvironment) *MockClient
CreateMockClient creates a new MockClient
func (*MockClient) Get ¶
func (mc *MockClient) Get() (interfaces.Prism, error)
Get returns the mockPrism
func (*MockClient) SetInformers ¶
func (mc *MockClient) SetInformers(sharedInformers informers.SharedInformerFactory)
SetInformers sets the sharedInformers
type MockEnvironment ¶
type MockEnvironment struct {
// contains filtered or unexported fields
}
func CreateMockEnvironment ¶
func (*MockEnvironment) AddCluster ¶
func (m *MockEnvironment) AddCluster(cluster *prismClientV3.ClusterIntentResponse) *prismClientV3.ClusterIntentResponse
func (*MockEnvironment) DeleteCluster ¶
func (m *MockEnvironment) DeleteCluster(clusterUUID string)
func (*MockEnvironment) GetCluster ¶
func (m *MockEnvironment) GetCluster(ctx context.Context, clusterName string) *prismClientV3.ClusterIntentResponse
func (*MockEnvironment) GetVM ¶
func (m *MockEnvironment) GetVM(ctx context.Context, vmName string) *prismClientV3.VMIntentResponse
type MockPrism ¶
type MockPrism struct {
// contains filtered or unexported fields
}
func (*MockPrism) GetCluster ¶
func (mp *MockPrism) GetCluster(ctx context.Context, clusterUUID string) (*prismClientV3.ClusterIntentResponse, error)
func (*MockPrism) GetVM ¶
func (mp *MockPrism) GetVM(ctx context.Context, vmUUID string) (*prismClientV3.VMIntentResponse, error)
func (*MockPrism) ListAllCluster ¶
func (mp *MockPrism) ListAllCluster(ctx context.Context, filter string) (*prismClientV3.ClusterListIntentResponse, error)
Click to show internal directories.
Click to hide internal directories.