Documentation ¶
Index ¶
- Constants
- Variables
- func CustomizeHostVersion(hostSystemId string, version string, apiVersion string) error
- func CustomizeVM(vmClient *vim25.Client, node *v1.Node, spec *types.VirtualMachineConfigSpec) error
- func DefaultNodes() []*v1.Node
- func GetVM(vmClient *vim25.Client, node *v1.Node) (*mo.VirtualMachine, error)
- func GetVSphereConfig(fileName string) *util.VSphereConfig
- func Infrastructure(modifiers ...func(*ocpv1.Infrastructure)) *ocpv1.Infrastructure
- func InfrastructureWithFailureDomain(modifiers ...func(*ocpv1.Infrastructure)) *ocpv1.Infrastructure
- func InfrastructureWithMultiVCenters(modifiers ...func(*ocpv1.Infrastructure)) *ocpv1.Infrastructure
- func InfrastructureWithMultipleFailureDomain(modifiers ...func(*ocpv1.Infrastructure)) *ocpv1.Infrastructure
- func Node(name string, modifiers ...func(*v1.Node)) *v1.Node
- func ReadFile(name string) ([]byte, error)
- func SetHardwareVersion(vmClient *vim25.Client, node *v1.Node, hardwareVersion string) error
- func WithProviderID(id string) func(*v1.Node)
- type FakeKubeClient
- func (f *FakeKubeClient) GetInfrastructure(ctx context.Context) (*ocpv1.Infrastructure, error)
- func (f *FakeKubeClient) ListNodes(ctx context.Context) ([]*v1.Node, error)
- func (f *FakeKubeClient) ListPVs(ctx context.Context) ([]*v1.PersistentVolume, error)
- func (f *FakeKubeClient) ListStorageClasses(ctx context.Context) ([]*storagev1.StorageClass, error)
- type SimulatedVM
- type TestSetup
- type VCenter
Constants ¶
View Source
const ( DefaultModel = "testlib/testdata/default" DefaultHostId = "host-24" // Generated by vcsim )
Variables ¶
View Source
var (
NodeProperties = []string{"config.extraConfig", "config.flags", "config.version", "runtime.host"}
)
Functions ¶
func CustomizeHostVersion ¶
func CustomizeVM ¶
func DefaultNodes ¶
func GetVSphereConfig ¶
func GetVSphereConfig(fileName string) *util.VSphereConfig
func Infrastructure ¶
func Infrastructure(modifiers ...func(*ocpv1.Infrastructure)) *ocpv1.Infrastructure
func InfrastructureWithFailureDomain ¶
func InfrastructureWithFailureDomain(modifiers ...func(*ocpv1.Infrastructure)) *ocpv1.Infrastructure
func InfrastructureWithMultiVCenters ¶
func InfrastructureWithMultiVCenters(modifiers ...func(*ocpv1.Infrastructure)) *ocpv1.Infrastructure
func InfrastructureWithMultipleFailureDomain ¶
func InfrastructureWithMultipleFailureDomain(modifiers ...func(*ocpv1.Infrastructure)) *ocpv1.Infrastructure
func SetHardwareVersion ¶
func WithProviderID ¶
Types ¶
type FakeKubeClient ¶
type FakeKubeClient struct { Infrastructure *ocpv1.Infrastructure Nodes []*v1.Node StorageClasses []*storagev1.StorageClass PVs []*v1.PersistentVolume }
func (*FakeKubeClient) GetInfrastructure ¶
func (f *FakeKubeClient) GetInfrastructure(ctx context.Context) (*ocpv1.Infrastructure, error)
func (*FakeKubeClient) ListPVs ¶
func (f *FakeKubeClient) ListPVs(ctx context.Context) ([]*v1.PersistentVolume, error)
func (*FakeKubeClient) ListStorageClasses ¶
func (f *FakeKubeClient) ListStorageClasses(ctx context.Context) ([]*storagev1.StorageClass, error)
type SimulatedVM ¶
type SimulatedVM struct {
Name, UUID string
}
type TestSetup ¶
type TestSetup struct { Context context.Context VMConfig *util.VSphereConfig VCenters map[string]*VCenter ClusterInfo *util.ClusterInfo }
func SetupSimulator ¶
func SetupSimulator(kubeClient *FakeKubeClient, modelDir string) (setup *TestSetup, cleanup func(), err error)
func SetupSimulatorWithConfig ¶
func SetupSimulatorWithConfig(kubeClient *FakeKubeClient, modelDir, cloudConfig string) (setup *TestSetup, cleanup func(), err error)
Click to show internal directories.
Click to hide internal directories.