Documentation ¶
Index ¶
- Constants
- Variables
- func AddClusterCSIDriverClient(apiClient *utils.APIClient, obj *opv1.ClusterCSIDriver) *utils.APIClient
- func AddInitialObjects(objects []runtime.Object, clients *utils.APIClient) error
- func ConnectToSimulator(s *simulator.Server) (*govmomi.Client, error)
- func CustomizeHostVersion(hostSystemId string, version string) error
- func CustomizeVCenterVersion(version string, apiVersion string, conn *vclib.VSphereConnection)
- func CustomizeVM(conn *vclib.VSphereConnection, node *v1.Node, ...) error
- func DefaultNodes() []*v1.Node
- func GetCSIDriver(withOCPAnnotation bool) *storagev1.CSIDriver
- func GetCSINode() *storagev1.CSINode
- func GetClusterCSIDriver(hasTopology bool) *opv1.ClusterCSIDriver
- func GetConfigMap() *v1.ConfigMap
- func GetDCSecret() *v1.Secret
- func GetInfraObject() *ocpv1.Infrastructure
- func GetInfraObjectWithEmptyPlatformSpec() *ocpv1.Infrastructure
- func GetMatchingCondition(status []opv1.OperatorCondition, conditionType string) *opv1.OperatorCondition
- func GetMultiVCSecret() *v1.Secret
- func GetNewConfigMap() *v1.ConfigMap
- func GetSecret() *v1.Secret
- func GetSingleFailureDomainInfra() *ocpv1.Infrastructure
- func GetTestClusterResult(statusType checks.CheckStatusType) checks.ClusterCheckResult
- func GetVSphereConfig(fileName string) (*vclib.VSphereConfig, error)
- func GetZonalInfra() *ocpv1.Infrastructure
- func GetZonalMultiVCenterInfra() *ocpv1.Infrastructure
- func NewFakeClients(coreObjects []runtime.Object, operatorObject *FakeDriverInstance, ...) *utils.APIClient
- func Node(name string, modifiers ...func(*v1.Node)) *v1.Node
- func ReadFile(name string) ([]byte, error)
- func SetHWVersion(conn *vclib.VSphereConnection, node *v1.Node, hardwareVersion string) error
- func SetupSimulator(modelDir string, infra *ocpv1.Infrastructure) ([]*vclib.VSphereConnection, func(), error)
- func StartFakeInformer(clients *utils.APIClient, stopCh <-chan struct{})
- func WaitForSync(clients *utils.APIClient, stopCh <-chan struct{})
- func WithProviderID(id string) func(*v1.Node)
- type FakeDriverInstance
Constants ¶
View Source
const ( DefaultModel = "testlib/testdata/default" DefaultVMPath = "/DC0/vm/" )
Variables ¶
View Source
var ( // Virtual machines generated by vSphere simulator. UUIDs look generated, but they're stable. DefaultVMs = []simulatedVM{ {"DC0_H0_VM0", "265104de-1472-547c-b873-6dc7883fb6cb"}, {"DC0_H0_VM1", "39365506-5a0a-5fd0-be10-9586ad53aaad"}, } DefaultHostId = "host-24" // Generated by vcsim )
Functions ¶
func AddInitialObjects ¶
func CustomizeHostVersion ¶
func CustomizeVCenterVersion ¶
func CustomizeVCenterVersion(version string, apiVersion string, conn *vclib.VSphereConnection)
func CustomizeVM ¶
func CustomizeVM(conn *vclib.VSphereConnection, node *v1.Node, spec *types.VirtualMachineConfigSpec) error
func DefaultNodes ¶
func GetCSIDriver ¶
func GetCSINode ¶
func GetClusterCSIDriver ¶
func GetClusterCSIDriver(hasTopology bool) *opv1.ClusterCSIDriver
func GetConfigMap ¶
func GetDCSecret ¶
func GetInfraObject ¶
func GetInfraObject() *ocpv1.Infrastructure
func GetInfraObjectWithEmptyPlatformSpec ¶
func GetInfraObjectWithEmptyPlatformSpec() *ocpv1.Infrastructure
func GetMatchingCondition ¶
func GetMatchingCondition(status []opv1.OperatorCondition, conditionType string) *opv1.OperatorCondition
func GetMultiVCSecret ¶
func GetNewConfigMap ¶
GetNewConfigMap this function generates a config map with the newer YAML provider config.
func GetSingleFailureDomainInfra ¶
func GetSingleFailureDomainInfra() *ocpv1.Infrastructure
func GetTestClusterResult ¶
func GetTestClusterResult(statusType checks.CheckStatusType) checks.ClusterCheckResult
func GetVSphereConfig ¶
func GetVSphereConfig(fileName string) (*vclib.VSphereConfig, error)
func GetZonalInfra ¶
func GetZonalInfra() *ocpv1.Infrastructure
func GetZonalMultiVCenterInfra ¶
func GetZonalMultiVCenterInfra() *ocpv1.Infrastructure
func NewFakeClients ¶
func SetHWVersion ¶
func SetupSimulator ¶
func SetupSimulator(modelDir string, infra *ocpv1.Infrastructure) ([]*vclib.VSphereConnection, func(), error)
func StartFakeInformer ¶
func WaitForSync ¶
func WithProviderID ¶
Types ¶
type FakeDriverInstance ¶
type FakeDriverInstance struct { metav1.ObjectMeta Spec opv1.OperatorSpec Status opv1.OperatorStatus }
fakeInstance is a fake CSI driver instance that also fullfils the OperatorClient interface
func MakeFakeDriverInstance ¶
func MakeFakeDriverInstance(modifiers ...driverModifier) *FakeDriverInstance
Click to show internal directories.
Click to hide internal directories.