Documentation
¶
Index ¶
- Constants
- Variables
- func AddAnnotationsToSpecificResource(oc *exutil.CLI, resourceKindAndName, resourceNamespace string, ...) (string, error)
- func AddLabelToNode(oc *exutil.CLI, node string, label string, value string) (string, error)
- func AddLabelsToSpecificResource(oc *exutil.CLI, resourceKindAndName string, resourceNamespace string, ...) (string, error)
- func AnnotateTestSuite()
- func ApplyClusterResourceFromTemplate(oc *exutil.CLI, parameters ...string)
- func ApplyClusterResourceFromTemplateWithError(oc *exutil.CLI, parameters ...string) error
- func ApplyNsResourceFromTemplate(oc *exutil.CLI, namespace string, parameters ...string)
- func ApplyOperatorResourceByYaml(oc *exutil.CLI, namespace string, yamlfile string)
- func ApplyResourceFromTemplateWithNonAdminUser(oc *exutil.CLI, parameters ...string) error
- func ArchiveMustGatherFile(oc *exutil.CLI, addExtraContent func(*exutil.CLI, string) error) error
- func ArtifactDirPath() string
- func ArtifactPath(elem ...string) string
- func AssertAllNonJobPodsToBeReadyWithPollerParams(oc *exutil.CLI, namespace string, interval, timeout time.Duration)
- func AssertAllPodsToBeReady(oc *exutil.CLI, namespace string)
- func AssertAllPodsToBeReadyWithPollerParams(oc *exutil.CLI, namespace string, interval, timeout time.Duration)
- func AssertIfMCPChangesAppliedByName(oc *exutil.CLI, mcpName string, timeDurationSec int)
- func AssertIfNodePoolIsReadyByName(oc *exutil.CLI, nodePoolName string, timeDurationSec int, clustersNS string)
- func AssertIfNodePoolUpdatingConfigByName(oc *exutil.CLI, nodePoolName string, timeDurationSec int, clustersNS string)
- func AssertOprPodLogsbyFilter(oc *exutil.CLI, podName string, namespace string, filter string, ...) bool
- func AssertOprPodLogsbyFilterWithDuration(oc *exutil.CLI, podName string, namespace string, filter string, ...)
- func AssertOrCheckMCP(oc *exutil.CLI, mcp string, interval, timeout time.Duration, skip bool) error
- func AssertPodToBeReady(oc *exutil.CLI, podName string, namespace string)
- func AssertWaitPollNoErr(e error, msg string)
- func AssertWaitPollWithErr(e error, msg string)
- func AzureCredentialsStructToString[T any](s T) string
- func BASE64DecodeStr(src string) string
- func By(text string)
- func CPUManagerStatebyNode(oc *exutil.CLI, namespace string, nodeName string, ContainerName string) (string, string)
- func CalculatePodMetrics(adminClient kubernetes.Interface, adminConfig *restclient.Config) error
- func CanArchiveMustGather() (float64, error)
- func CheckAKSCluster(ctx context.Context, oc *exutil.CLI) bool
- func CheckAllNodepoolReadyByHostedClusterName(oc *exutil.CLI, nodePoolName, hostedClusterNS string, timeDurationSec int) bool
- func CheckAppearance(oc *exutil.CLI, interval, timeout time.Duration, ...) bool
- func CheckBuildCancelled(b *buildv1.Build) bool
- func CheckBuildFailed(b *buildv1.Build) bool
- func CheckBuildSuccess(b *buildv1.Build) bool
- func CheckForBuildEvent(client corev1client.CoreV1Interface, build *buildv1.Build, ...)
- func CheckHypershiftOperatorExistence(mgmtOC *exutil.CLI) (bool, error)
- func CheckImageStreamLatestTagPopulated(i *imagev1.ImageStream) bool
- func CheckImageStreamTagNotFound(i *imagev1.ImageStream) bool
- func CheckNetworkOperatorStatus(oc *exutil.CLI) error
- func CheckNetworkType(oc *exutil.CLI) string
- func CheckPlatform(oc *exutil.CLI) string
- func CheckPodIsReady(pod kapiv1.Pod) bool
- func CheckPodIsRunning(pod kapiv1.Pod) bool
- func CheckPodIsSucceeded(pod kapiv1.Pod) bool
- func CheckPodNoOp(pod kapiv1.Pod) bool
- func CleanupOperatorResourceByYaml(oc *exutil.CLI, namespace string, yamlfile string)
- func CleanupResource(oc *exutil.CLI, interval, timeout time.Duration, ...)
- func CompareMachineCreationTime(oc *exutil.CLI, ms1 string, ms2 string) bool
- func ContainsAll(big, small map[string]interface{}) bool
- func ConvertStrToJson(str string) (map[string]interface{}, error)
- func CountLinuxWorkerNodeNumByOS(oc *exutil.CLI) (linuxNum int)
- func CountNodeNumByOS(oc *exutil.CLI) (linuxNum int, windowsNum int)
- func CreateAzureContainerRegistry(sess *AzureSession, registryName string, resourceGroupName string, ...) error
- func CreateAzureStorageBlobContainer(container azblob.ContainerURL) error
- func CreateCentosExecPodOrFail(client kubernetes.Interface, ns, generateName string, tweak func(*v1.Pod)) *v1.Pod
- func CreateClusterResourceFromTemplate(oc *exutil.CLI, parameters ...string)
- func CreateClusterResourceFromTemplateWithError(oc *exutil.CLI, parameters ...string) error
- func CreateCustomNodePoolInHypershift(oc *exutil.CLI, ...)
- func CreateExecPodOrFail(client corev1client.CoreV1Interface, ns, name string) string
- func CreateGCSBucket(projectID, bucketName string) error
- func CreateLDAPTestServer(oc *exutil.CLI) (string, []byte, error)
- func CreateMachinesetbyInstanceType(oc *exutil.CLI, machinesetName string, instanceType string)
- func CreateNFDInstance(oc *exutil.CLI, namespace string)
- func CreateNsResourceFromTemplate(oc *exutil.CLI, namespace string, parameters ...string)
- func CreateOpenStackContainer(client *gophercloud.ServiceClient, name string) error
- func CreateResource(jsonFilePath string, oc *exutil.CLI) error
- func CreateServiceAccount(oc *exutil.CLI, account string, clusterRole string) (token string, err error)
- func DebugNode(oc *exutil.CLI, nodeName string, cmd ...string) (string, error)
- func DebugNodeRetryWithOptionsAndChroot(oc *exutil.CLI, nodeName string, options []string, cmd ...string) (string, error)
- func DebugNodeRetryWithOptionsAndChrootWithStdErr(oc *exutil.CLI, nodeName string, options []string, cmd ...string) (string, string, error)
- func DebugNodeWithChroot(oc *exutil.CLI, nodeName string, cmd ...string) (string, error)
- func DebugNodeWithOptions(oc *exutil.CLI, nodeName string, options []string, cmd ...string) (string, error)
- func DebugNodeWithOptionsAndChroot(oc *exutil.CLI, nodeName string, options []string, cmd ...string) (string, error)
- func DebugNodeWithOptionsAndChrootWithoutRecoverNsLabel(oc *exutil.CLI, nodeName string, options []string, cmd ...string) (stdOut string, stdErr string, err error)
- func DeleteAzureContainerRegistry(sess *AzureSession, registryName string, resourceGroupName string) error
- func DeleteAzureStorageBlobContainer(container azblob.ContainerURL) error
- func DeleteGCSBucket(bucketName string) error
- func DeleteLabelFromNode(oc *exutil.CLI, node string, label string) (string, error)
- func DeleteLabelsFromSpecificResource(oc *exutil.CLI, resourceKindAndName string, resourceNamespace string, ...) (string, error)
- func DeleteMCAndMCPByName(oc *exutil.CLI, mcName string, mcpName string, timeDurationSec int)
- func DeleteOpenStackContainer(client *gophercloud.ServiceClient, name string) error
- func DeletePVCsForDeployment(client clientset.Interface, oc *exutil.CLI, deploymentPrefix string)
- func DeleteRoleAssignments(sess *AzureSession, roleAssignmentName string, scope string) error
- func DumpAndReturnTagging(tags []string) ([]string, error)
- func DumpApplicationPodLogs(dcName string, oc *exutil.CLI)
- func DumpBuildLogs(bc string, oc *exutil.CLI)
- func DumpBuilds(oc *exutil.CLI)
- func DumpConfigMapStates(oc *exutil.CLI)
- func DumpDeploymentLogs(dcName string, version int64, oc *exutil.CLI)
- func DumpImageStreams(oc *exutil.CLI)
- func DumpPersistentVolumeInfo(oc *exutil.CLI)
- func DumpPodLogs(pods []kapiv1.Pod, oc *exutil.CLI)
- func DumpPodLogsStartingWith(prefix string, oc *exutil.CLI)
- func DumpPodLogsStartingWithInNamespace(prefix, namespace string, oc *exutil.CLI)
- func DumpPodStates(oc *exutil.CLI)
- func DumpPodStatesInNamespace(namespace string, oc *exutil.CLI)
- func DumpPodsCommand(c kubernetes.Interface, ns string, selector labels.Selector, cmd string)
- func DumpSampleOperator(oc *exutil.CLI)
- func DuplicateFileToPath(srcPath string, destPath string)
- func DuplicateFileToTemp(srcPath string, destPrefix string) string
- func EmptyAzureBlobContainer(container azblob.ContainerURL) error
- func EmptyGCSBucket(client storage.Client, bucketName string) error
- func EmptyOpenStackContainer(client *gophercloud.ServiceClient, name string) error
- func ExamineDiskUsage()
- func ExaminePodDiskUsage(oc *exutil.CLI)
- func ExtendedCheckPlatform(ctx context.Context, oc *exutil.CLI) string
- func ExtractCcoctl(oc *exutil.CLI, releaseImage, ccoctlTarget string) string
- func ExtractCoreOSBootImagesConfigMap(oc *exutil.CLI, releaseImage, pullSecretFile string) (*corev1.ConfigMap, error)
- func ExtractSpecifiedValueFromMetricData4MemRSS(oc *exutil.CLI, metricResult string) (string, int)
- func ExtractVPCIDFromBaseDomain(oc *exutil.CLI, vpcs []vpcv1.VPC, baseDomain string) (string, error)
- func FatalErr(msg interface{})
- func FetchURL(oc *exutil.CLI, url string, retryTimeout time.Duration) (string, error)
- func FindCLIImage(oc *exutil.CLI) (string, bool)
- func FindImageFormatString(oc *exutil.CLI) (string, bool)
- func FindRouterImage(oc *exutil.CLI) (string, error)
- func FixturePath(elem ...string) string
- func GenerateManifestFile(oc *exutil.CLI, baseDir string, manifestFile string, ...) (string, error)
- func GetAWSClusterRegion(oc *exutil.CLI) (string, error)
- func GetAllNodes(oc *exutil.CLI) ([]string, error)
- func GetAllNodesByNodePoolNameInHostedCluster(oc *exutil.CLI, nodePoolName string) ([]string, error)
- func GetAllNodesbyOSType(oc *exutil.CLI, ostype string) ([]string, error)
- func GetAllPods(oc *exutil.CLI, namespace string) ([]string, error)
- func GetAllPodsWithLabel(oc *exutil.CLI, namespace string, label string) ([]string, error)
- func GetAllWorkerNodesByOSID(oc *exutil.CLI, osID string) ([]string, error)
- func GetAllocatableResourcesNodesMap(nodes []v1.Node) map[string]NodeResources
- func GetAnnotationsFromSpecificResource(oc *exutil.CLI, resourceKindAndName, resourceNamespace string) ([]string, error)
- func GetApplicationPods(oc *exutil.CLI, dcName string) (*kapiv1.PodList, error)
- func GetAuthenticatedUserID(providerClient *gophercloud.ProviderClient) (string, error)
- func GetAzureContainerRepositoryCredential(sess *AzureSession, registryName string, resourceGroupName string) (string, string, error)
- func GetAzureCredentialFromCluster(oc *exutil.CLI) (string, error)
- func GetAzureCredsLocation() (string, error)
- func GetAzureStackVMStatus(resourceGroupName, vmName string) (string, error)
- func GetAzureStorageAccount(sess *AzureSession, resourceGroupName string) (string, error)
- func GetAzureStorageAccountFromCluster(oc *exutil.CLI) (string, string, error)
- func GetAzureVMInstance(sess *AzureSession, vmName string, resourceGroupName string) (string, error)
- func GetAzureVMInstanceState(sess *AzureSession, vmName string, resourceGroupName string) (string, error)
- func GetAzureVMPrivateIP(sess *AzureSession, rg, vmName string) (string, error)
- func GetAzureVMPublicIP(sess *AzureSession, rg, vmName string) (string, error)
- func GetAzureVMPublicIPByNameRegex(sess *AzureSession, rg, publicIPNameRegex string) (string, error)
- func GetClusterNodesBy(oc *exutil.CLI, role string) ([]string, error)
- func GetClusterNodesByRoleInHostedCluster(oc *exutil.CLI, role string) ([]string, error)
- func GetClusterPrefixName(oc *exutil.CLI) string
- func GetClusterVersion(oc *exutil.CLI) (string, string, error)
- func GetContainerIDByPODName(oc *exutil.CLI, podName string, namespace string) string
- func GetCurrentTestPolarionIDNumber() string
- func GetDeploymentConfigPods(oc *exutil.CLI, dcName string, version int64) (*kapiv1.PodList, error)
- func GetDockerImageReference(c imagev1typedclient.ImageStreamInterface, name, tag string) (string, error)
- func GetEndpointAddress(oc *exutil.CLI, name string) (string, error)
- func GetFieldWithJsonpath(oc *exutil.CLI, interval, timeout time.Duration, ...) (string, error)
- func GetFileContent(baseDir string, name string) (fileContent string)
- func GetFirstCoreOsWorkerNode(oc *exutil.CLI) (string, error)
- func GetFirstLinuxMachineSets(oc *exutil.CLI) string
- func GetFirstLinuxWorkerNode(oc *exutil.CLI) (string, error)
- func GetFirstLinuxWorkerNodeInHostedCluster(oc *exutil.CLI) (string, error)
- func GetFirstMasterNode(oc *exutil.CLI) (string, error)
- func GetFirstRhelWorkerNode(oc *exutil.CLI) (string, error)
- func GetFirstWorkerNode(oc *exutil.CLI) (string, error)
- func GetFirstWorkerNodeByNodePoolNameInHostedCluster(oc *exutil.CLI, nodePoolName string) (string, error)
- func GetGcpProjectID(oc *exutil.CLI) (string, error)
- func GetHostedClusterVersion(mgmtOc *exutil.CLI, hostedClusterName, hostedClusterNs string) semver.Version
- func GetHyperShiftHostedClusterNameSpace(oc *exutil.CLI) string
- func GetHyperShiftOperatorNameSpace(oc *exutil.CLI) string
- func GetIBMCredentialFromCluster(oc *exutil.CLI) (string, string, string, error)
- func GetIBMInstanceID(session *IBMSession, oc *exutil.CLI, region string, vpcName string, ...) (string, error)
- func GetIBMInstanceStatus(session *IBMSession, instanceID string) (string, error)
- func GetIBMPowerVsCloudID(oc *exutil.CLI, nodeName string) string
- func GetIBMPowerVsInstanceInfo(powerClient *IBMPowerVsSession, instanceName string) (string, string, error)
- func GetIBMRegion(oc *exutil.CLI) (string, error)
- func GetIBMResourceGrpName(oc *exutil.CLI) (string, error)
- func GetIPVersionStackType(oc *exutil.CLI) (ipvStackType string)
- func GetImageIDForTags(comps []string) ([]string, error)
- func GetImagestreamImageName(oc *exutil.CLI, imagestreamName string) string
- func GetInfraID(oc *exutil.CLI) (string, error)
- func GetLastLinuxWorkerNode(oc *exutil.CLI) (string, error)
- func GetLatest4StableImage() (string, error)
- func GetLatest4StableImageByStream(arch string, stream string) (latestImage string, err error)
- func GetLatestImage(arch, product, stream string) (string, error)
- func GetLatestNightlyImage(release string) (string, error)
- func GetLatestReleaseImageFromEnv() string
- func GetMachineSetInstanceType(oc *exutil.CLI) string
- func GetMasterThreadDump(oc *exutil.CLI)
- func GetMirrorRegistry(oc *exutil.CLI) (registry string, err error)
- func GetMustGatherFileName() string
- func GetNFDInstanceImage(oc *exutil.CLI, namespace string) string
- func GetNFDVersionbyPackageManifest(oc *exutil.CLI, namespace string) string
- func GetNodeArchByName(oc *exutil.CLI, nodeName string) string
- func GetNodeHostname(oc *exutil.CLI, node string) (string, error)
- func GetNodeListByLabel(oc *exutil.CLI, labelKey string) []string
- func GetNodeNameByMachineset(oc *exutil.CLI, machinesetName string) string
- func GetNodePoolNamesbyHostedClusterName(oc *exutil.CLI, hostedClusterName, hostedClusterNS string) []string
- func GetNutanixCredFromCluster(oc *exutil.CLI) (string, error)
- func GetNutanixCredentialFromCluster(oc *exutil.CLI) (string, string, string, error)
- func GetNutanixHostromCluster(oc *exutil.CLI) (string, error)
- func GetOIDCProvider(oc *exutil.CLI) (string, error)
- func GetOpenStackUserIDAndDomainID(cred *OpenstackCredentials) (string, string)
- func GetOperatorPKGManifestDefaultChannel(oc *exutil.CLI, pkgManifestName, namespace string) (string, error)
- func GetOperatorPKGManifestSource(oc *exutil.CLI, pkgManifestName, namespace string) (string, error)
- func GetPODCPUSet(oc *exutil.CLI, namespace string, nodeName string, containerID string) string
- func GetPodForContainer(container kapiv1.Container) *kapiv1.Pod
- func GetPodLogs(oc *exutil.CLI, pod, container, since string) (string, error)
- func GetPodName(oc *exutil.CLI, namespace string, podLabel string, node string) (string, error)
- func GetPodNameInHostedCluster(oc *exutil.CLI, namespace string, podLabel string, node string) (string, error)
- func GetPodNamesByFilter(c corev1client.PodInterface, label labels.Selector, ...) (podNames []string, err error)
- func GetPodNodeName(oc *exutil.CLI, namespace string, podName string) (string, error)
- func GetPodsNodesMap(oc *exutil.CLI, nodes []v1.Node) map[string][]v1.Pod
- func GetPrivateKey() (string, error)
- func GetPublicKey() (string, error)
- func GetPullSec(oc *exutil.CLI, dirname string) (err error)
- func GetRDU2HostsList() (map[string]*RDU2Host, error)
- func GetRHCOSImageURLForAzureDisk(oc *exutil.CLI, releaseImage string, pullSecretFile string, ...) (string, error)
- func GetROSAClusterID() string
- func GetRandomString() string
- func GetReleaseImage(oc *exutil.CLI) (string, error)
- func GetRelicasByMachinesetName(oc *exutil.CLI, machinesetName string) string
- func GetRemainingResourcesNodesMap(oc *exutil.CLI, nodes []v1.Node) map[string]NodeResources
- func GetRequestedResourcesNodesMap(oc *exutil.CLI, nodes []v1.Node) map[string]NodeResources
- func GetResourceSpecificLabelValue(oc *exutil.CLI, resourceKindAndName string, resourceNamespace string, ...) (string, error)
- func GetRouterPodTemplate(oc *exutil.CLI) (*corev1.PodTemplateSpec, string, error)
- func GetSAToken(oc *exutil.CLI) (string, error)
- func GetSchedulableLinuxWorkerNodes(oc *exutil.CLI) ([]v1.Node, error)
- func GetSpecificPodLogs(oc *exutil.CLI, namespace string, container string, podName string, ...) (string, error)
- func GetSpecificPodLogsCombinedOrNot(oc *exutil.CLI, namespace string, container string, podName string, ...) (string, error)
- func GetStatefulSetPods(oc *exutil.CLI, setName string) (*kapiv1.PodList, error)
- func GetSystemctlServiceUnitTimestampByPropertyNameWithMonotonic(propertyValue string) int
- func GetUserAssignedIdentityPrincipalID(sess *AzureSession, resourceGroup string, identityName string) (string, error)
- func GetUserCAToFile(oc *exutil.CLI, filename string) (err error)
- func GrantRoleToPrincipalIDByResourceGroup(sess *AzureSession, principalID string, resourceGroup string, roleId string) (roleAssignmentName string, scope string)
- func ImplStringArrayContains(stringArray []string, name string) bool
- func InitDefaultEnvironmentVariables()
- func InitStandardFlags()
- func InitTest(dryRun bool) error
- func InstallNFD(oc *exutil.CLI, nfdNamespace string)
- func InstallPAO(oc *exutil.CLI, paoNamespace string)
- func Is3MasterNoDedicatedWorkerNode(oc *exutil.CLI) bool
- func IsAKSCluster(ctx context.Context, oc *exutil.CLI) (bool, error)
- func IsArbiterCluster(oc *exutil.CLI) bool
- func IsBase64Encoded(s string) bool
- func IsClusterOperated(oc *exutil.CLI) bool
- func IsDefaultNodeSelectorEnabled(oc *exutil.CLI) bool
- func IsDeploymentReady(deploy *appsv1.Deployment) bool
- func IsExternalOIDCCluster(oc *exutil.CLI) (bool, error)
- func IsHypershiftHostedCluster(oc *exutil.CLI) bool
- func IsInfrastructuresHighlyAvailable(oc *exutil.CLI) bool
- func IsKeycloakExtOIDCCluster() bool
- func IsMachineSetExist(oc *exutil.CLI) bool
- func IsNamespacePrivileged(oc *exutil.CLI, namespace string) (bool, error)
- func IsNodeLabeledByNFD(oc *exutil.CLI) bool
- func IsOneMasterWithNWorkerNodes(oc *exutil.CLI) bool
- func IsOpenShiftCluster(ctx context.Context, c corev1client.NamespaceInterface) (bool, error)
- func IsPAOInOperatorHub(oc *exutil.CLI) bool
- func IsPAOInstalled(oc *exutil.CLI) bool
- func IsROSA() bool
- func IsROSACluster(oc *exutil.CLI) bool
- func IsRosaCluster(oc *exutil.CLI) bool
- func IsSNOCluster(oc *exutil.CLI) bool
- func IsSTSCluster(oc *exutil.CLI) bool
- func IsSpecifiedAnnotationKeyExist(oc *exutil.CLI, resourceKindAndName, resourceNamespace, annotationKey string) bool
- func IsTechPreviewNoUpgrade(oc *exutil.CLI) bool
- func IsWorkerNode(oc *exutil.CLI, nodeName string) bool
- func IsWorkloadIdentityCluster(oc *exutil.CLI) bool
- func KubeConfigPath() string
- func LDAPClientMounts() ([]corev1.VolumeMount, []corev1.Volume)
- func LabelPod(oc *exutil.CLI, namespace string, podName string, label string) error
- func LaunchWebserverPod(f *e2e.Framework, podName, nodeName string) (ip string)
- func ListGCSBuckets(client storage.Client, projectID string) ([]string, error)
- func ListImages() ([]string, error)
- func ListServersByName(client *gophercloud.ServiceClient, instanceName string) ([]servers.Server, error)
- func ModifyYamlFileContent(file string, replacements []YamlReplace)
- func MoveFileToPath(srcPath string, destPath string)
- func MustGetAzureCredsLocation() string
- func NewAzureContainerClient(oc *exutil.CLI, accountName, accountKey, azContainerName string) (azblob.ContainerURL, error)
- func NewCLI(project, adminConfigPath string) *exutil.CLI
- func NewCLIForKube(basename string) *exutil.CLI
- func NewCLIForKubeOpenShift(basename string) *exutil.CLI
- func NewCLIWithoutNamespace(project string) *exutil.CLI
- func NewOpenStackClient(cred *OpenstackCredentials, serviceType string) *gophercloud.ServiceClient
- func NewPodExecutor(oc *exutil.CLI, name, image string) (*podExecutor, error)
- func NewRuleResolver(informers rbacinformers.Interface) rbacregistryvalidation.AuthorizationRuleResolver
- func OrFail[T any](vals ...any) T
- func ParameterizedTemplateByReplaceToFile(oc *exutil.CLI, parameters ...string) string
- func ParseLabelsOrDie(str string) labels.Selector
- func PathExists(path string) (bool, error)
- func PerformInstanceActionOnPowerVs(powerClient *IBMPowerVsSession, instanceID, action string) error
- func PreDetermineExternalOIDCCluster() (bool, error)
- func PreDetermineK8sCluster() (isK8s bool, err error)
- func PreSetEnvK8s() (res string)
- func PreSetEnvOIDCCluster() (res string)
- func PreTestDump()
- func ProcessAzurePages[T any](ctx context.Context, pager *runtime.Pager[T], handlePage func(page T) error) error
- func ProcessTemplate(oc *exutil.CLI, parameters ...string) string
- func ROSALogin()
- func ROSAValidHypershiftAndGetGuestKubeConf(oc *exutil.CLI) (string, string, string)
- func RandStr(n int) string
- func RandStrCustomize(s string, n int) string
- func RandStrDefault() string
- func ReadFixture(path string) (runtime.Object, error)
- func ReadFixtureOrFail(path string) runtime.Object
- func ReadLDAPServerTestData() (*app.Deployment, *corev1.Service, *corev1.ConfigMap, *corev1.ConfigMap)
- func RecoverNamespaceRestricted(oc *exutil.CLI, namespace string) error
- func RemoteShContainer(oc *exutil.CLI, namespace string, podName string, container string, ...) (string, error)
- func RemoteShPod(oc *exutil.CLI, namespace string, podName string, cmd ...string) (string, error)
- func RemoteShPodWithBash(oc *exutil.CLI, namespace string, podName string, cmd ...string) (string, error)
- func RemoteShPodWithBashSpecifyContainer(oc *exutil.CLI, namespace string, podName string, containerName string, ...) (string, error)
- func RemoteShPodWithChroot(oc *exutil.CLI, namespace string, podName string, cmd ...string) (string, error)
- func RemoveAnnotationFromSpecificResource(oc *exutil.CLI, resourceKindAndName, resourceNamespace string, ...) (string, error)
- func RemoveDeploymentConfigs(oc *exutil.CLI, dcs ...string) error
- func RemovePodsWithPrefixes(oc *exutil.CLI, prefixes ...string) error
- func RemoveStatefulSets(oc *exutil.CLI, sets ...string) error
- func RunOneShotCommandPod(oc *exutil.CLI, name, image, command string, volumeMounts []corev1.VolumeMount, ...) (string, []error)
- func Secure(securedMatcher types.GomegaMatcher) types.GomegaMatcher
- func SetNamespacePrivileged(oc *exutil.CLI, namespace string) error
- func SetVPCServiceURLForRegion(session *IBMSession, region string) error
- func SetupK8SNFSServerAndVolume(oc *exutil.CLI, count int) (*kapiv1.Pod, []*kapiv1.PersistentVolume, error)
- func ShowSystemctlPropertyValueOfServiceUnitByName(oc *exutil.CLI, tunedNodeName string, ntoNamespace string, serviceUnit string, ...) string
- func SkipBaselineCaps(oc *exutil.CLI, sets string)
- func SkipForSNOCluster(oc *exutil.CLI)
- func SkipIfCapEnabled(oc *exutil.CLI, capability string)
- func SkipIfDisableDefaultCatalogsource(oc *exutil.CLI)
- func SkipIfPlatformType(oc *exutil.CLI, platforms string)
- func SkipIfPlatformTypeNot(oc *exutil.CLI, platforms string)
- func SkipMissingQECatalogsource(oc *exutil.CLI)
- func SkipNoBuild(oc *exutil.CLI)
- func SkipNoCapabilities(oc *exutil.CLI, capability string)
- func SkipNoDefaultSC(oc *exutil.CLI)
- func SkipNoDeploymentConfig(oc *exutil.CLI)
- func SkipNoImageRegistry(oc *exutil.CLI)
- func SkipNoOLMCore(oc *exutil.CLI)
- func SkipNoOLMv1Core(oc *exutil.CLI)
- func SkipOnAKSNess(ctx context.Context, oc *exutil.CLI, expectAKS bool)
- func SkipOnHypershiftOperatorExistence(mgmtOC *exutil.CLI, expectHO bool)
- func SkipOnOpenShiftNess(expectOpenShift bool)
- func SkipOnProxyCluster(oc *exutil.CLI)
- func SpecifyMachinesetWithDifferentInstanceType(oc *exutil.CLI) string
- func StartAzureStackVM(resourceGroupName, vmName string) error
- func StartAzureVM(sess *AzureSession, vmName string, resourceGroupName string) (osr autorest.Response, err error)
- func StartBuild(oc *exutil.CLI, args ...string) (stdout, stderr string, err error)
- func StartIBMInstance(session *IBMSession, instanceID string) error
- func StopAzureStackVM(resourceGroupName, vmName string) error
- func StopAzureVM(sess *AzureSession, vmName string, resourceGroupName string) (osr autorest.Response, err error)
- func StopIBMInstance(session *IBMSession, instanceID string) error
- func StringToBASE64(src string) string
- func StringsSliceContains(stringsSlice []string, element string) (bool, int)
- func StringsSliceElementsAddSuffix(stringsSlice []string, suffix string) []string
- func StringsSliceElementsHasPrefix(stringsSlice []string, elementPrefix string, sequentialFlag bool) (bool, int)
- func TimedWaitForAnImageStreamTag(oc *exutil.CLI, namespace, name, tag string, waitTimeout time.Duration) error
- func UpdateFile(filePath string, stringPairs []StringPairs) (err error)
- func ValidHypershiftAndGetGuestKubeConf(oc *exutil.CLI) (string, string, string)
- func ValidHypershiftAndGetGuestKubeConf4SecondHostedCluster(oc *exutil.CLI) (string, string, string)
- func ValidHypershiftAndGetGuestKubeConfWithNoSkip(oc *exutil.CLI) (string, string, string)
- func VarSubOnFile(srcFile string, destFile string, vars map[string]string) error
- func WaitAndGetSpecificPodLogs(oc *exutil.CLI, namespace string, container string, podName string, ...) (string, error)
- func WaitForABuild(c buildv1clienttyped.BuildInterface, name string, ...) error
- func WaitForAJob(c batchv1client.JobInterface, name string, timeout time.Duration) error
- func WaitForAnImageStream(client imagev1typedclient.ImageStreamInterface, name string, ...) error
- func WaitForAnImageStreamTag(oc *exutil.CLI, namespace, name, tag string) error
- func WaitForBuildResult(c buildv1clienttyped.BuildInterface, result *BuildResult) error
- func WaitForDeploymentConfig(kc kubernetes.Interface, dcClient appsv1clienttyped.DeploymentConfigsGetter, ...) error
- func WaitForDeploymentsReady(ctx context.Context, ...)
- func WaitForEndpoint(c kclientset.Interface, ns, name string) error
- func WaitForEndpointsAvailable(oc *exutil.CLI, serviceName string) error
- func WaitForHypershiftHostedClusterReady(oc *exutil.CLI, hostedClusterName, hostedClusterNS string)
- func WaitForInternalRegistryHostname(oc *exutil.CLI) (string, error)
- func WaitForNoPodsAvailable(oc *exutil.CLI) error
- func WaitForNoPodsAvailableByKind(oc *exutil.CLI, kind string, name string, namespace string)
- func WaitForNodeToDisappear(oc *exutil.CLI, nodeName string, timeout, interval time.Duration)
- func WaitForOpenShiftNamespaceImageStreams(oc *exutil.CLI) error
- func WaitForPods(c corev1client.PodInterface, label labels.Selector, ...) ([]string, error)
- func WaitForQueryOutputContains(oc *exutil.CLI, d Database, timeout time.Duration, admin bool, ...) error
- func WaitForQueryOutputSatisfies(oc *exutil.CLI, d Database, timeout time.Duration, admin bool, query string, ...) error
- func WaitForResourceQuotaSync(client corev1client.ResourceQuotaInterface, name string, ...) (corev1.ResourceList, error)
- func WaitForResourceUpdate(ctx context.Context, oc *exutil.CLI, interval, timeout time.Duration, ...) error
- func WaitForRouterInternalIP(oc *exutil.CLI) (string, error)
- func WaitForRouterServiceIP(oc *exutil.CLI) (string, error)
- func WaitForSelfSAR(interval, timeout time.Duration, c kclientset.Interface, ...) error
- func WaitForServiceAccount(c corev1client.ServiceAccountInterface, name string, checkSecret bool) error
- func WaitForUserBeAuthorized(oc *exutil.CLI, user, verb, resource string) error
- func WaitOprResourceReady(oc *exutil.CLI, kind, name, namespace string, islongduration bool, ...)
- func WaitUntilAllHelpersAreUp(oc *exutil.CLI, helpers []Database) error
- func WaitUntilPodIsGone(c corev1client.PodInterface, podName string, timeout time.Duration) error
- func WaitUntilUp(oc *exutil.CLI, d Database, timeout time.Duration) error
- func Yaml2Json(s string) (string, error)
- type AWSInstanceNotFound
- type AwsClient
- func (a *AwsClient) AssociateDhcpOptions(vpcID, dhcpOptionsID string) error
- func (a *AwsClient) CreateDhcpOptions() (string, error)
- func (a *AwsClient) CreateDhcpOptionsWithDomainName(domainName string) (string, error)
- func (a *AwsClient) CreateSecurityGroup(groupName, vpcID, description string) (string, error)
- func (a *AwsClient) CreateTag(resource string, key string, value string) error
- func (a *AwsClient) DeleteDhcpOptions(dhcpOptionsID string) error
- func (a *AwsClient) DeleteSecurityGroup(groupID string) error
- func (a *AwsClient) DeleteTag(resource string, key string, value string) error
- func (a *AwsClient) DescribeTags(resourceType string, resourceId string) (*ec2.DescribeTagsOutput, error)
- func (a *AwsClient) DescribeVpcEndpoint(endpointID string) (*ec2.VpcEndpoint, error)
- func (a *AwsClient) GetAvailabilityZoneNames() ([]string, error)
- func (a *AwsClient) GetAwsInstanceID(instanceName string) (string, error)
- func (a *AwsClient) GetAwsInstanceIDFromHostname(hostname string) (string, error)
- func (a *AwsClient) GetAwsInstanceState(instanceID string) (string, error)
- func (a *AwsClient) GetAwsInstanceVPCId(instanceID string) (string, error)
- func (a *AwsClient) GetAwsIntIPs(instanceID string) (map[string]string, error)
- func (a *AwsClient) GetAwsPrivateSubnetIDs(vpcID string) ([]string, error)
- func (a *AwsClient) GetAwsPublicSubnetID(clusterID string) (string, error)
- func (a *AwsClient) GetDefaultSecurityGroupByVpcID(vpcID string) (*ec2.SecurityGroup, error)
- func (a *AwsClient) GetDhcpOptionsIDFromTag(tagKey string, tagValue string) ([]string, error)
- func (a *AwsClient) GetDhcpOptionsIDOfVpc(vpcID string) (string, error)
- func (a *AwsClient) GetInstanceSecurityGroupIDs(instanceID string) ([]string, error)
- func (a *AwsClient) GetPlacementGroupByName(groupName string) (string, error)
- func (a *AwsClient) GetSecurityGroupByGroupID(groupID string) (*ec2.SecurityGroup, error)
- func (a *AwsClient) GetSecurityGroupByGroupName(groupName string) (*ec2.SecurityGroup, error)
- func (a *AwsClient) GetSecurityGroupsByVpcEndpointID(endpointID string) ([]*ec2.SecurityGroupIdentifier, error)
- func (a *AwsClient) StartInstance(instanceID string) error
- func (a *AwsClient) StopInstance(instanceID string) error
- func (a *AwsClient) UpdateAwsIntSecurityRule(instanceID string, dstPort int64) error
- type AzureClientSet
- func NewAzureClientSet(subscriptionId string, tokenCredential azcore.TokenCredential) *AzureClientSet
- func NewAzureClientSetWithCredsFromCanonicalFile() *AzureClientSet
- func NewAzureClientSetWithCredsFromFile(filePath string) *AzureClientSet
- func NewAzureClientSetWithRootCreds(oc *exutil.CLI) *AzureClientSet
- func (cs *AzureClientSet) CreateCapacityReservation(ctx context.Context, capacityReservationGroupName string, ...) error
- func (cs *AzureClientSet) CreateCapacityReservationGroup(ctx context.Context, capacityReservationGroupName string, ...) (string, error)
- func (cs *AzureClientSet) CreateResourceGroup(ctx context.Context, resourceGroupName, region string) (armresources.ResourceGroupsClientCreateOrUpdateResponse, error)
- func (cs *AzureClientSet) CreateStorageAccount(ctx context.Context, resourceGroupName, storageAccountName, region string) (armstorage.AccountsClientListKeysResponse, error)
- func (cs *AzureClientSet) DeleteCapacityReservation(ctx context.Context, capacityReservationGroupName string, ...) error
- func (cs *AzureClientSet) DeleteCapacityReservationGroup(ctx context.Context, capacityReservationGroupName string, ...) error
- func (cs *AzureClientSet) DeleteResourceGroup(ctx context.Context, rgName string) error
- func (cs *AzureClientSet) DeleteStorageAccount(ctx context.Context, resourceGroupName, storageAccountName string)
- func (cs *AzureClientSet) GetCapacityReservationGroupClient(options *arm.ClientOptions) *armcompute.CapacityReservationGroupsClient
- func (cs *AzureClientSet) GetCapacityReservationsClient(options *arm.ClientOptions) *armcompute.CapacityReservationsClient
- func (cs *AzureClientSet) GetFeaturesClient(options *arm.ClientOptions) *armfeatures.Client
- func (cs *AzureClientSet) GetGraphServiceClient(scopes []string) *msgraphsdkgo.GraphServiceClient
- func (cs *AzureClientSet) GetKeysClient(options *arm.ClientOptions) *armkeyvault.KeysClient
- func (cs *AzureClientSet) GetResourceGroupClient(options *arm.ClientOptions) *armresources.ResourceGroupsClient
- func (cs *AzureClientSet) GetServicePrincipalObjectId(ctx context.Context, appId string) (string, error)
- func (cs *AzureClientSet) GetStorageAccountProperties(storageAccountName string, resourceGroupName string) armstorage.AccountsClientGetPropertiesResponse
- func (cs *AzureClientSet) GetVaultsClient(options *arm.ClientOptions) *armkeyvault.VaultsClient
- func (cs *AzureClientSet) GetVirtualMachinesClient(options *arm.ClientOptions) *armcompute.VirtualMachinesClient
- func (cs *AzureClientSet) RegisterEncryptionAtHost(ctx context.Context) error
- type AzureCredentials
- type AzureCredentialsFromFile
- type AzureSession
- type BucketEmptiness
- type BuildResult
- type ByName
- type ContainerMemoryRSSType
- type CoreOSImageArch
- type Credential
- type Database
- type ECRClient
- type Gcloud
- func (gcloud *Gcloud) AddBGPPeerToRouter(routerName string, peerName string, peerASN int64, interfaceName string, ...) (addBGPPeerToRouter []byte, err error)
- func (gcloud *Gcloud) AddInterfaceToRouter(routerName string, interfaceName string, tunnelName string, ipAddress string, ...) (addInterfaceToRouter []byte, err error)
- func (gcloud *Gcloud) CreateDeploymentManager(deploymentName string, config string) (deploymentManagerInfo []byte, err error)
- func (gcloud *Gcloud) CreateExternalVPNGateway(gatewayName string, vpnAddress []string) (createExternalVPNGateway []byte, err error)
- func (gcloud *Gcloud) CreateVPNGateway(gatewayName string, networkName string, region string) (createVPNGateway []byte, err error)
- func (gcloud *Gcloud) CreateVPNTunnel(tunnelName string, peerGateway string, peerGatewayInterface int, region string, ...) (createVPNTunnel []byte, err error)
- func (gcloud *Gcloud) CreateVpnRouter(routerName string, networkName string, region string, asn int32) (createVpnRouter []byte, err error)
- func (gcloud *Gcloud) DeleteDeploymentManager(deploymentName string) (deploymentManagerInfo []byte, err error)
- func (gcloud *Gcloud) DeleteExternalVPNGateway(gatewayName string) (deleteExternalVPNGateway []byte, err error)
- func (gcloud *Gcloud) DeleteVPNGateway(gatewayName string, region string) (deleteVPNGateway []byte, err error)
- func (gcloud *Gcloud) DeleteVPNTunnel(tunnelName string, region string) (deleteVPNTunnel []byte, err error)
- func (gcloud *Gcloud) DeleteVpnRouter(routerName string, region string) (deleteVpnRouter []byte, err error)
- func (gcloud *Gcloud) GetFilestoreInstanceInfo(pvName string, filterArgs ...string) ([]byte, error)
- func (gcloud *Gcloud) GetFirewallAllowPorts(ruleName string) (string, error)
- func (gcloud *Gcloud) GetGcpInstanceByNode(nodeIdentity string) (string, error)
- func (gcloud *Gcloud) GetGcpInstanceStateByNode(nodeIdentity string) (string, error)
- func (gcloud *Gcloud) GetIntSvcExternalIP(infraID string) (string, error)
- func (gcloud *Gcloud) GetIntSvcInternalIP(infraID string) (string, error)
- func (gcloud *Gcloud) GetPdVolumeInfo(pvName string, filterArgs ...string) ([]byte, error)
- func (gcloud *Gcloud) GetResourceTags(bucketName string, zone string) ([]byte, error)
- func (gcloud *Gcloud) GetVPNGatewayIP(gatewayName, region string, interfaceIndex int) (string, error)
- func (gcloud *Gcloud) GetZone(infraID string, workerName string) (string, error)
- func (gcloud *Gcloud) Login() *Gcloud
- func (gcloud *Gcloud) StartInstance(nodeName string, zoneName string) error
- func (gcloud *Gcloud) StopInstance(nodeName string, zoneName string) error
- func (gcloud *Gcloud) StopInstanceAsync(nodeName string, zoneName string) error
- func (gcloud *Gcloud) UpdateFirewallAllowPorts(ruleName string, ports string) error
- type GitRepo
- type HostedClusterPlatformType
- type IAMClient
- func (iamClient *IAMClient) AttachRolePolicy(roleName, policyArn string) error
- func (iamClient *IAMClient) CreatePolicy(policyDocument string, policyName string, description string, ...) (string, error)
- func (iamClient *IAMClient) CreateRoleWithContext(ctx aws.Context, input *iam.CreateRoleInput, opts ...request.Option) (*iam.CreateRoleOutput, error)
- func (iamClient *IAMClient) DeleteOpenIDConnectProviderByProviderName(providerName string) error
- func (iamClient *IAMClient) DeletePolicy(policyArn string) error
- func (iamClient *IAMClient) DeleteRoleWithContext(ctx aws.Context, input *iam.DeleteRoleInput, opts ...request.Option) (*iam.DeleteRoleOutput, error)
- func (iamClient *IAMClient) DetachRolePolicy(roleName, policyArn string) error
- func (iamClient *IAMClient) GetRolePolicy(roleName, policyName string) (string, error)
- func (iamClient *IAMClient) ListOperatsorRolesByPrefix(prefix string, version string) ([]*iam.Role, error)
- func (iamClient *IAMClient) ListRoles() ([]*iam.Role, error)
- func (iamClient *IAMClient) UpdateRolePolicy(roleName, policyName, policyDocument string) error
- type IBMPowerVsSession
- type IBMSession
- type KMSClient
- type LogDumperFunc
- type MissingTagError
- type Monitor
- func (mo *Monitor) GetAlertRules() (string, error)
- func (mo *Monitor) GetAlerts() (string, error)
- func (mo *Monitor) GetAllRules() (string, error)
- func (mo *Monitor) GetRecordRules() (string, error)
- func (mo *Monitor) InstantQuery(queryParams MonitorInstantQueryParams) (string, error)
- func (mo *Monitor) InstantQueryWithRetry(queryParams MonitorInstantQueryParams, timeDurationSec int) string
- func (mo *Monitor) RangeQuery(queryParams MonitorRangeQueryParams) (string, error)
- func (mo *Monitor) SimpleQuery(query string) (string, error)
- type MonitorInstantQueryParams
- type MonitorRangeQueryParams
- type Monitorer
- type NodeResources
- type NutanixClient
- type NutanixSession
- type OpenstackCredentials
- type Osp
- func (osp *Osp) GetOspInstance(client *gophercloud.ServiceClient, instanceName string) (string, error)
- func (osp *Osp) GetOspInstanceState(client *gophercloud.ServiceClient, instanceName string) (string, error)
- func (osp *Osp) GetStartOspInstance(client *gophercloud.ServiceClient, instanceName string) error
- func (osp *Osp) GetStopOspInstance(client *gophercloud.ServiceClient, instanceName string) error
- type Pod
- type PrometheusMonitor
- type RDU2Host
- type RDU2Hosts
- type ReplicaSet
- type Route53Client
- func (route53Client *Route53Client) DeleteHostedZoneWithContextAndCheck(ctx context.Context, input *route53.DeleteHostedZoneInput, ...) (*route53.DeleteHostedZoneOutput, error)
- func (route53Client *Route53Client) EmptyHostedZoneWithContext(ctx context.Context, hostedZoneId string) (*route53.ChangeResourceRecordSetsOutput, error)
- type S3Client
- func (sc *S3Client) CreateBucket(name string) error
- func (sc *S3Client) DeleteBucket(name string) error
- func (sc *S3Client) EmptyBucketWithContextAndCheck(ctx context.Context, bucketName string) error
- func (sc *S3Client) HeadBucket(name string) error
- func (sc *S3Client) IsBucketEmptyWithContext(ctx aws.Context, input *s3.ListObjectsV2Input, opts ...request.Option) (bool, error)
- func (sc *S3Client) PutBucketPolicy(name, policy string) error
- func (sc *S3Client) WaitForBucketEmptinessWithContext(ctx context.Context, bucketName string, bucketEmptiness BucketEmptiness, ...) error
- type Secret
- type SecureMatcher
- type SshClient
- type StringPairs
- type StsClient
- type SynchronizedBuffer
- type TerraformExec
- func (tf *TerraformExec) TerraformApply(vars ...string) error
- func (tf *TerraformExec) TerraformDestroy(vars ...string) error
- func (tf *TerraformExec) TerraformInit() error
- func (tf *TerraformExec) TerraformInitWithUpgrade() error
- func (tf *TerraformExec) TerraformOutput() (map[string]string, error)
- func (tf *TerraformExec) TerraformShow() (*tfjson.State, error)
- type TestEnv
- type TestEnvType
- type Vmware
- func (vmware *Vmware) GetVsphereConnectionLogout(c *govmomi.Client) error
- func (vmware *Vmware) GetVspheresInstance(c *govmomi.Client, vmInstance string) (string, error)
- func (vmware *Vmware) GetVspheresInstanceState(c *govmomi.Client, vmInstance string) (string, error)
- func (vmware *Vmware) Login() (*Vmware, *govmomi.Client)
- func (vmware *Vmware) StartVsphereInstance(c *govmomi.Client, vmInstance string) error
- func (vmware *Vmware) StopVsphereInstance(c *govmomi.Client, vmInstance string) error
- type YamlReplace
Constants ¶
const ( MachineAPINamespace = "openshift-machine-api" //MapiMachineset means the fullname of mapi machineset MapiMachineset = "machinesets.machine.openshift.io" //MapiMachine means the fullname of mapi machine MapiMachine = "machines.machine.openshift.io" )
We are no longer updating this file because we deprecated it, the new file is test/extended/util/clusterinfra/machine_helpers.go This file is not deleted because there are some old dependencies
const ( CoreOSBootImagesFile = "0000_50_installer_coreos-bootimages.yaml" CoreOSBootImageArchX86_64 CoreOSImageArch = "x86_64" ReleaseImageLatestEnv = "RELEASE_IMAGE_LATEST" )
const ( AsAdmin = true AsUser = false WithoutNamespace = true WthNamespace = false Immediately = true NotImmediately = false AllowEmpty = true NotAllowEmpty = false Appear = true Disappear = false )
const ( EnvIsExternalOIDCCluster = "ENV_IS_EXTERNAL_OIDC_CLUSTER" EnvIsKubernetesCluster = "ENV_IS_KUBERNETES_CLUSTER" )
const ( TestEnvProw TestEnvType = 1 << iota TestEnvJenkins TestEnvLocal ArtifactDirEnvProw = "ARTIFACT_DIR" PullSecretDirEnvProw = "CLUSTER_PROFILE_DIR" PullSecretFileNameProw = "pull-secret" PullSecretLocationEnvLocal = "PULL_SECRET_LOCATION" )
const ( BMPoweredOn = "poweredon" BMPoweredOff = "poweredoff" )
const ( PropRuntimePowerState = "summary.runtime.powerState" PropConfigTemplate = "summary.config.template" )
A creating represents constants ...
const (
AKSNodeLabel = "kubernetes.azure.com/cluster"
)
const (
AzureCredsLocationEnv = "AZURE_AUTH_LOCATION"
)
const (
// This image is used for both client and server pods. Temporary repo location.
OpenLDAPTestImage = "docker.io/mrogers950/origin-openldap-test:fedora29"
)
Variables ¶
var ( IsExternalOIDCClusterFlag = "" IsKubernetesClusterFlag = "" )
var TestContext *e2e.TestContextType = &e2e.TestContext
Functions ¶
func AddAnnotationsToSpecificResource ¶
func AddAnnotationsToSpecificResource(oc *exutil.CLI, resourceKindAndName, resourceNamespace string, annotations ...string) (string, error)
AddAnnotationsToSpecificResource adds the custom annotations to the specific resource
func AddLabelToNode ¶
AddLabelToNode add the custom label to the node
func AddLabelsToSpecificResource ¶
func AddLabelsToSpecificResource(oc *exutil.CLI, resourceKindAndName string, resourceNamespace string, labels ...string) (string, error)
AddLabelsToSpecificResource adds the custom labels to the specific resource
func AnnotateTestSuite ¶
func AnnotateTestSuite()
func ApplyClusterResourceFromTemplate ¶
ApplyClusterResourceFromTemplate apply the changes to the cluster resource. For ex: ApplyClusterResourceFromTemplate(oc, "--ignore-unknown-parameters=true", "-f", "TEMPLATE LOCATION")
func ApplyClusterResourceFromTemplateWithError ¶
ApplyClusterResourceFromTemplateWithError apply the changes to the cluster resource and return error if happned. For ex: ApplyClusterResourceFromTemplateWithError(oc, "--ignore-unknown-parameters=true", "-f", "TEMPLATE LOCATION")
func ApplyNsResourceFromTemplate ¶
ApplyNsResourceFromTemplate apply changes to the ns resource. No need to add a namespace parameter in the template file as it can be provided as a function argument. For ex: ApplyNsResourceFromTemplate(oc, "NAMESPACE", "--ignore-unknown-parameters=true", "-f", "TEMPLATE LOCATION")
func ApplyOperatorResourceByYaml ¶
ApplyOperatorResourceByYaml - It's not a template yaml file, the yaml shouldn't include namespace, we specify namespace by parameter.
func ApplyResourceFromTemplateWithNonAdminUser ¶
ApplyResourceFromTemplateWithNonAdminUser to as normal user to create resource from template
func ArchiveMustGatherFile ¶
ArchiveMustGatherFile creates a must-gather file to be archived by the CI prow job The addExtraContent function can be provided to add extra content to the must-gather file. Set it to nil if no extra content is needed. Conditions to generate a must-gather file: - The QE_MUST_GATHER_DIR environment variable must be defined and pointing to a valid directory. - The directory defined in the QE_MUST_GATHER_DIR env var must not contain more than 500M, including the must-gather file that is being generated. - A maximum of 2 must-gather files are allowed per prow job execution. If more that 2 test cases try to create a must-gather file in a the same prow job execution, only 2 must-gather files will be created and the rest will be ignored. - One test case can only create one must-gather file
func ArtifactDirPath ¶
func ArtifactDirPath() string
ArtifactDirPath returns the value of ARTIFACT_DIR environment variable
func ArtifactPath ¶
ArtifactPath returns the absolute path to the fix artifact file The path is relative to ARTIFACT_DIR
func AssertAllNonJobPodsToBeReadyWithPollerParams ¶
func AssertAllNonJobPodsToBeReadyWithPollerParams(oc *exutil.CLI, namespace string, interval, timeout time.Duration)
AssertAllNonJobPodsToBeReadyWithPollerParams assert all non-Job pods in NS are in ready state until timeout in a given namespace Exclude transient Job pods ('job-name') from readiness: build Job pods are short‑lived and not expected to be Ready=True, so including them causes false failure we validate the Job via logs/conditions separately, and this gate only asserts persistent controller pods (e.g., machine‑os‑builder) are Ready.
func AssertAllPodsToBeReady ¶
AssertAllPodsToBeReady assert all pods in NS are in ready state until timeout in a given namespace
func AssertAllPodsToBeReadyWithPollerParams ¶
func AssertAllPodsToBeReadyWithPollerParams(oc *exutil.CLI, namespace string, interval, timeout time.Duration)
AssertAllPodsToBeReadyWithPollerParams assert all pods in NS are in ready state until timeout in a given namespace Pros: allow user to customize poller parameters
func AssertIfMCPChangesAppliedByName ¶
AssertIfMCPChangesAppliedByName checks the MCP of a given oc client and determines if the machine counts are as expected
func AssertIfNodePoolIsReadyByName ¶
func AssertIfNodePoolIsReadyByName(oc *exutil.CLI, nodePoolName string, timeDurationSec int, clustersNS string)
AssertIfNodePoolIsReadyByName checks if the Nodepool is ready
func AssertIfNodePoolUpdatingConfigByName ¶
func AssertIfNodePoolUpdatingConfigByName(oc *exutil.CLI, nodePoolName string, timeDurationSec int, clustersNS string)
AssertIfNodePoolUpdatingConfigByName checks if the Nodepool is ready
func AssertOprPodLogsbyFilter ¶
func AssertOprPodLogsbyFilter(oc *exutil.CLI, podName string, namespace string, filter string, minimalMatch int) bool
AssertOprPodLogsbyFilter trunct pods logs by filter
func AssertOprPodLogsbyFilterWithDuration ¶
func AssertOprPodLogsbyFilterWithDuration(oc *exutil.CLI, podName string, namespace string, filter string, timeDurationSec int, minimalMatch int)
AssertOprPodLogsbyFilterWithDuration used for truncting pods logs by filter
func AssertOrCheckMCP ¶
func AssertPodToBeReady ¶
AssertPodToBeReady poll pod status to determine it is ready
func AssertWaitPollNoErr ¶
func AssertWaitPollWithErr ¶
func By ¶
func By(text string)
when 4.14 synch with k1.27, there is gingkgo upgrade from 2.4 to 26 By method changes and it does not print "STEP:" information. some tester want to use it. so, make this wrapper to print if you want to get "STEP:", you need to change g.By to exutil.By text is the string you want to describe the step.
func CPUManagerStatebyNode ¶
func CalculatePodMetrics ¶
func CalculatePodMetrics(adminClient kubernetes.Interface, adminConfig *restclient.Config) error
CalculatePodMetrics receives an admin client and an admin.kubeconfig, and traverses a list of operator namespaces, measuring requests-per-second for each operator pod, using the overall long-running time of each pod as a base metric.
func CanArchiveMustGather ¶
CanArchiveMustGather returns the number of megas in the artifacts directory and and error if the must-gather file cannot be created
func CheckAllNodepoolReadyByHostedClusterName ¶
func CheckAllNodepoolReadyByHostedClusterName(oc *exutil.CLI, nodePoolName, hostedClusterNS string, timeDurationSec int) bool
CheckAllNodepoolReadyByHostedClusterName used for checking if all nodepool is ready eg. CheckAllNodepoolReadyByHostedClusterName(oc, psap-qe-hcluster01,clusters,3600)
func CheckAppearance ¶
func CheckAppearance(oc *exutil.CLI, interval, timeout time.Duration, immediately, asAdmin, withoutNamespace, appear bool, parameters ...string) bool
CheckAppearance check if the resource appears or not. interval and timeout is the inveterl and timeout of Poll immediately means if it wait first interval and then check asAdmin means oc.AsAdmin() or not withoutNamespace means oc.WithoutNamespace() or not. appear means expect appear or not for example, expect pod in ns appear CheckAppearance(oc, 4*time.Second, 200*time.Second, exutil.NotImmediately, exutil.AsAdmin, exutil.WithoutNamespace, exutil.Appear, "-n", ns, "pod" name) if you expect pod in ns disappear, could be CheckAppearance(oc, 4*time.Second, 200*time.Second, exutil.NotImmediately, exutil.AsAdmin, exutil.WithoutNamespace, exutil.Disappear, "-n", ns, "pod" name)
func CheckBuildCancelled ¶
CheckBuildCancelled return true if the build was canceled
func CheckBuildFailed ¶
CheckBuildFailed return true if the build failed
func CheckBuildSuccess ¶
CheckBuildSuccess returns true if the build succeeded
func CheckForBuildEvent ¶
func CheckForBuildEvent(client corev1client.CoreV1Interface, build *buildv1.Build, reason, message string)
CheckForBuildEvent will poll a build for up to 1 minute looking for an event with the specified reason and message template.
func CheckImageStreamLatestTagPopulated ¶
func CheckImageStreamLatestTagPopulated(i *imagev1.ImageStream) bool
CheckImageStreamLatestTagPopulated returns true if the imagestream has a ':latest' tag filed
func CheckImageStreamTagNotFound ¶
func CheckImageStreamTagNotFound(i *imagev1.ImageStream) bool
CheckImageStreamTagNotFound return true if the imagestream update was not successful
func CheckNetworkOperatorStatus ¶
check until CNO operator status reports True, False, False for Available, Progressing, Degraded status,
func CheckNetworkType ¶
func CheckPlatform ¶
CheckPlatform check the cluster's platform
func CheckPodIsReady ¶
CheckPodIsReady returns true if the pod's ready probe determined that the pod is ready.
func CheckPodIsRunning ¶
CheckPodIsRunning returns true if the pod is running
func CheckPodIsSucceeded ¶
CheckPodIsSucceeded returns true if the pod status is "Succdeded"
func CleanupOperatorResourceByYaml ¶
CleanupOperatorResourceByYaml - It's not a template yaml file, the yaml shouldn't include namespace, we specify namespace by parameter.
func CleanupResource ¶
func CleanupResource(oc *exutil.CLI, interval, timeout time.Duration, asAdmin, withoutNamespace bool, parameters ...string)
CleanupResource cleanup one resouce and check if it is not found. interval and timeout is the inveterl and timeout of Poll to check if it is not found asAdmin means oc.AsAdmin() or not withoutNamespace means oc.WithoutNamespace() or not. for example, cleanup cluster level resource CleanupResource(oc, 4*time.Second, 160*time.Second, exutil.AsAdmin, exutil.WithoutNamespace, "operator.operators.operatorframework.io", operator.Name) cleanup ns resource CleanupResource(oc, 4*time.Second, 160*time.Second, exutil.AsAdmin, exutil.WithoutNamespace, "-n", ns, "pod" name)
func ContainsAll ¶
ContainsAll checks if all keys and values in small are also in the big map.
func ConvertStrToJson ¶
ConvertStrToJson converts a JSON format string to data structure of map[string]interface{}
func CountLinuxWorkerNodeNumByOS ¶
CountNodeNumByOS used for count how many worker node by windows or linux
func CountNodeNumByOS ¶
CountNodeNumByOS used for count how many worker node by windows or linux
func CreateAzureContainerRegistry ¶
func CreateAzureContainerRegistry(sess *AzureSession, registryName string, resourceGroupName string, location string) error
CreateAzureContainerRegistry create azure container registry
func CreateAzureStorageBlobContainer ¶
func CreateAzureStorageBlobContainer(container azblob.ContainerURL) error
CreateAzureStorageBlobContainer creates azure storage container
func CreateCentosExecPodOrFail ¶
func CreateCentosExecPodOrFail(client kubernetes.Interface, ns, generateName string, tweak func(*v1.Pod)) *v1.Pod
CreateCentosExecPodOrFail creates a centos:7 pause pod used as a vessel for kubectl exec commands. Pod name is uniquely generated.
func CreateClusterResourceFromTemplate ¶
CreateClusterResourceFromTemplate create resource from the template. For ex: CreateClusterResourceFromTemplate(oc, "--ignore-unknown-parameters=true", "-f", "TEMPLATE LOCATION")
func CreateClusterResourceFromTemplateWithError ¶
CreateClusterResourceFromTemplateWithError create resource from the template and return error if happened. For ex: CreateClusterResourceFromTemplateWithError(oc, "--ignore-unknown-parameters=true", "-f", "TEMPLATE LOCATION")
func CreateCustomNodePoolInHypershift ¶
func CreateCustomNodePoolInHypershift(oc *exutil.CLI, cloudProvider, guestClusterName, nodePoolName, nodeCount, instanceType, upgradeType, clustersNS, defaultNodePoolName string)
CreateCustomNodePoolInHypershift retrun custom nodepool yaml
func CreateExecPodOrFail ¶
func CreateExecPodOrFail(client corev1client.CoreV1Interface, ns, name string) string
CreateExecPodOrFail creates a simple busybox pod in a sleep loop used as a vessel for kubectl exec commands. Returns the name of the created pod. TODO: expose upstream
func CreateGCSBucket ¶
CreateGCSBucket creates a GCS bucket in a project
func CreateLDAPTestServer ¶
CreateLDAPTestServer deploys an LDAP server on the service network and then confirms StartTLS connectivity with an ldapsearch against it. It returns the ldapserver host and the ldap CA, or an error.
func CreateMachinesetbyInstanceType ¶
CreateMachinesetbyInstanceType used to create a machineset with specified machineset name and instance type
func CreateNFDInstance ¶
CreateNFDInstance used for create NFD Instance in different namespace
func CreateNsResourceFromTemplate ¶
CreateNsResourceFromTemplate create ns resource from the template. No need to add a namespace parameter in the template file as it can be provided as a function argument. For ex: CreateNsResourceFromTemplate(oc, "NAMESPACE", "--ignore-unknown-parameters=true", "-f", "TEMPLATE LOCATION")
func CreateOpenStackContainer ¶
func CreateOpenStackContainer(client *gophercloud.ServiceClient, name string) error
CreateOpenStackContainer creates a storage container in openstack
func CreateResource ¶
CreateResource creates the resources from the supplied json file (not a template); ginkgo error checking included
func CreateServiceAccount ¶
func CreateServiceAccount(oc *exutil.CLI, account string, clusterRole string) (token string, err error)
CreateServiceAccount @Description Create a service account when it does not exist @Create jianl Jul 2 2025 @Param oc exCLI oc client instance @Param account string The service account name @Param clusterRole string The cluster role that the service account will be added to @Return (account token, error)
func DebugNodeRetryWithOptionsAndChroot ¶
func DebugNodeRetryWithOptionsAndChroot(oc *exutil.CLI, nodeName string, options []string, cmd ...string) (string, error)
DebugNodeRetryWithOptionsAndChroot launches debug container using chroot and with options And waitPoll to avoid "error: unable to create the debug pod" and do retry
func DebugNodeRetryWithOptionsAndChrootWithStdErr ¶
func DebugNodeRetryWithOptionsAndChrootWithStdErr(oc *exutil.CLI, nodeName string, options []string, cmd ...string) (string, string, error)
DebugNodeRetryWithOptionsAndChroot launches debug container using chroot and with options And waitPoll to avoid "error: unable to create the debug pod" and do retry Separate the Warning from Output: metadata.name: this is used in the Pod's hostname, which can result in surprising behavior; a DNS label is recommended: [must be no more than 63 characters]\ndevice name 'Warning: metadata.name: this is used in the Pod's hostname, which can result in surprising behavior; a DNS label is recommended: [must be no more than 63 characters]' longer than 127 characters\nerror: non-zero exit code from debug container
func DebugNodeWithChroot ¶
DebugNodeWithChroot creates a debugging session of the node with chroot
func DebugNodeWithOptions ¶
func DebugNodeWithOptions(oc *exutil.CLI, nodeName string, options []string, cmd ...string) (string, error)
DebugNodeWithOptions launches debug container with options e.g. --image
func DebugNodeWithOptionsAndChroot ¶
func DebugNodeWithOptionsAndChroot(oc *exutil.CLI, nodeName string, options []string, cmd ...string) (string, error)
DebugNodeWithOptionsAndChroot launches debug container using chroot and with options e.g. --image
func DebugNodeWithOptionsAndChrootWithoutRecoverNsLabel ¶
func DebugNodeWithOptionsAndChrootWithoutRecoverNsLabel(oc *exutil.CLI, nodeName string, options []string, cmd ...string) (stdOut string, stdErr string, err error)
DebugNodeWithOptionsAndChrootWithoutRecoverNsLabel launches debug container using chroot and with options e.g. --image WithoutRecoverNsLabel which will not recover the labels that added for debug node container adapt the podSecurity changed on 4.12+ test clusters "security.openshift.io/scc.podSecurityLabelSync=false" And "pod-security.kubernetes.io/enforce=privileged"
func DeleteAzureContainerRegistry ¶
func DeleteAzureContainerRegistry(sess *AzureSession, registryName string, resourceGroupName string) error
DeleteAzureContainerRegistry deletes azure container registry
func DeleteAzureStorageBlobContainer ¶
func DeleteAzureStorageBlobContainer(container azblob.ContainerURL) error
DeleteAzureStorageBlobContainer deletes azure storage container
func DeleteGCSBucket ¶
DeleteGCSBucket deletes the GCS bucket
func DeleteLabelFromNode ¶
DeleteLabelFromNode delete the custom label from the node
func DeleteLabelsFromSpecificResource ¶
func DeleteLabelsFromSpecificResource(oc *exutil.CLI, resourceKindAndName string, resourceNamespace string, labelNames ...string) (string, error)
DeleteLabelsFromSpecificResource deletes the custom labels from the specific resource
func DeleteMCAndMCPByName ¶
DeleteMCAndMCPByName used for checking if node return to worker machine config pool and the specified mcp is zero, then delete mc and mcp
func DeleteOpenStackContainer ¶
func DeleteOpenStackContainer(client *gophercloud.ServiceClient, name string) error
DeleteOpenStackContainer deletes the storage container from openstack
func DeletePVCsForDeployment ¶
func DeleteRoleAssignments ¶
func DeleteRoleAssignments(sess *AzureSession, roleAssignmentName string, scope string) error
DeleteRoleAssignments deletes role assignments
func DumpAndReturnTagging ¶
DumpAndReturnTagging takes and array of tags and obtains the hex image IDs, dumps them to ginkgo for printing, and then returns them
func DumpApplicationPodLogs ¶
DumpApplicationPodLogs will dump the latest application logs for a DeploymentConfig for debug purposes
func DumpBuildLogs ¶
DumpBuildLogs will dump the latest build logs for a BuildConfig for debug purposes
func DumpBuilds ¶
DumpBuilds will dump the yaml for every build in the test namespace; remember, pipeline builds don't have build pods so a generic framework dump won't cat our pipeline builds objs in openshift
func DumpConfigMapStates ¶
DumpConfigMapStates dumps the state of all ConfigMaps in the exutil.CLI's current namespace.
func DumpDeploymentLogs ¶
DumpDeploymentLogs will dump the latest deployment logs for a DeploymentConfig for debug purposes
func DumpImageStreams ¶
DumpImageStreams will dump both the openshift namespace and local namespace imagestreams as part of debugging when the language imagestreams in the openshift namespace seem to disappear
func DumpPodLogsStartingWith ¶
DumpPodLogsStartingWith will dump any pod starting with the name prefix provided
func DumpPodLogsStartingWithInNamespace ¶
DumpPodLogsStartingWith will dump any pod starting with the name prefix provided
func DumpPodStates ¶
DumpPodStates dumps the state of all pods in the exutil.CLI's current namespace.
func DumpPodStatesInNamespace ¶
DumpPodStatesInNamespace dumps the state of all pods in the provided namespace.
func DumpPodsCommand ¶
DumpPodsCommand runs the provided command in every pod identified by selector in the provided namespace.
func DumpSampleOperator ¶
func DuplicateFileToPath ¶
DuplicateFileToPath copies the file at srcPath to destPath.
func DuplicateFileToTemp ¶
DuplicateFileToTemp creates a temporary duplicate of the file at srcPath using destPattern for naming, returning the path of the duplicate.
func EmptyAzureBlobContainer ¶
func EmptyAzureBlobContainer(container azblob.ContainerURL) error
EmptyAzureBlobContainer removes all the files in azure storage container
func EmptyGCSBucket ¶
EmptyGCSBucket removes all the objects in the bucket
func EmptyOpenStackContainer ¶
func EmptyOpenStackContainer(client *gophercloud.ServiceClient, name string) error
EmptyOpenStackContainer clear all the objects in storage container
func ExamineDiskUsage ¶
func ExamineDiskUsage()
ExamineDiskUsage will dump df output on the testing system; leveraging this as part of diagnosing the registry's disk filling up during external tests on jenkins
func ExaminePodDiskUsage ¶
ExaminePodDiskUsage will dump df/du output on registry pod; leveraging this as part of diagnosing the registry's disk filling up during external tests on jenkins
func ExtractCcoctl ¶
ExtractCcotl extracts the specified version of the ccoctl binary from the given release image. It supports different versions of ccoctl for RHEL environments, including:
- "ccoctl"
- "ccoctl.rhel8" (RHEL 8 version)
- "ccoctl.rhel9" (RHEL 9 version)
Usage example:
ccoctlTarget := "ccoctl.rhel8" ccoctlPath := exutil.ExtractCcotl(oc, testOCPImage, ccoctlTarget, true) defer os.Remove(filepath.Dir(ccoctlPath))
Parameters:
- oc: exutil.CLI object to interact with OpenShift commands.
- releaseImage: The OpenShift release image from which to extract the ccoctl binary.
- ccoctlTarget: The target ccoctl version to extract (e.g., "ccoctl"(default), "ccoctl.rhel8", "ccoctl.rhel9").
Returns:
- A string containing the file path of the extracted ccoctl binary.
func ExtractCoreOSBootImagesConfigMap ¶
func ExtractCoreOSBootImagesConfigMap(oc *exutil.CLI, releaseImage, pullSecretFile string) (*corev1.ConfigMap, error)
ExtractCoreOSBootImagesConfigMap extracts the CoreOS boot images ConfigMap from the given release image
func ExtractSpecifiedValueFromMetricData4MemRSS ¶
ExtractSpecifiedValueFromMetricData4MemRSS extracts the value of the container_memory_rss metric from the result of a Prometheus query
func ExtractVPCIDFromBaseDomain ¶
func ExtractVPCIDFromBaseDomain(oc *exutil.CLI, vpcs []vpcv1.VPC, baseDomain string) (string, error)
ExtractVPCIDFromBaseDomain extracts the VPC ID based on the DNS base domain.
func FetchURL ¶
FetchURL grabs the output from the specified url and returns it. It will retry once per second for duration retryTimeout if an error occurs during the request.
func FindImageFormatString ¶
FindImageFormatString returns a format string for components on the cluster. It returns false if no format string could be inferred from the cluster. OpenShift 4.0 clusters will not be able to infer an image format string, so you must wrap this method in one that can locate your specific image.
func FixturePath ¶
FixturePath returns an absolute path to a fixture file in test/extended/testdata/, test/integration/, or examples/.
func GenerateManifestFile ¶
func GenerateManifestFile(oc *exutil.CLI, baseDir string, manifestFile string, replacement ...map[string]string) (string, error)
This function accept key value replacement in multiple formats manifestFile, err := GenerateManifestFile(oc, "config-map.yaml", "myDir", map[string]string{"<address>": address, "<username>": user}) manifestFile, err := GenerateManifestFile(oc, "namespace.yaml", "myDir", map[string]string{"<namespace>": namespace})
func GetAWSClusterRegion ¶
GetAWSClusterRegion returns AWS region of the cluster
func GetAllNodes ¶
GetAllNodes returns a list of the names of all nodes in the cluster
func GetAllNodesByNodePoolNameInHostedCluster ¶
func GetAllNodesByNodePoolNameInHostedCluster(oc *exutil.CLI, nodePoolName string) ([]string, error)
GetAllNodesByNodePoolNameInHostedCluster return all node names of specified nodepool in hosted cluster.
func GetAllNodesbyOSType ¶
GetAllNodesbyOSType returns a list of the names of all linux/windows nodes in the cluster have both linux and windows node
func GetAllPods ¶
GetAllPods returns a list of the names of all pods in the cluster in a given namespace
func GetAllPodsWithLabel ¶
GetAllPodsWithLabel get array of all pods for a given namespace and label
func GetAllWorkerNodesByOSID ¶
GetAllWorkerNodesByOSID returns list of worker nodes by OS ID
func GetAllocatableResourcesNodesMap ¶
func GetAllocatableResourcesNodesMap(nodes []v1.Node) map[string]NodeResources
GetAllocatableResourcesNodesMap returns the total allocatable CPU and Memory in each node
func GetAnnotationsFromSpecificResource ¶
func GetAnnotationsFromSpecificResource(oc *exutil.CLI, resourceKindAndName, resourceNamespace string) ([]string, error)
GetAnnotationsFromSpecificResource gets the annotations from the specific resource
func GetApplicationPods ¶
func GetAuthenticatedUserID ¶
func GetAuthenticatedUserID(providerClient *gophercloud.ProviderClient) (string, error)
GetAuthenticatedUserID gets current user ID some users don't have permission to list users, so here extract user ID from auth response
func GetAzureContainerRepositoryCredential ¶
func GetAzureContainerRepositoryCredential(sess *AzureSession, registryName string, resourceGroupName string) (string, string, error)
GetAzureContainerRepositoryCredential get azure container repository credential
func GetAzureCredentialFromCluster ¶
GetAzureCredentialFromCluster gets Azure credentials from cluster and loads them as environment variables
func GetAzureCredsLocation ¶
func GetAzureStackVMStatus ¶
GetAzureStackVMStatus gets the status of the virtual machine with the given name in the specified resource group using Azure exutil.CLI
func GetAzureStorageAccount ¶
func GetAzureStorageAccount(sess *AzureSession, resourceGroupName string) (string, error)
GetAzureStorageAccount get Azure Storage Account
func GetAzureStorageAccountFromCluster ¶
GetAzureStorageAccountFromCluster gets azure storage accountName and accountKey from image registry TODO: create a storage account and use that accout to manage azure container
func GetAzureVMInstance ¶
func GetAzureVMInstance(sess *AzureSession, vmName string, resourceGroupName string) (string, error)
GetAzureVMInstance get vm instance
func GetAzureVMInstanceState ¶
func GetAzureVMInstanceState(sess *AzureSession, vmName string, resourceGroupName string) (string, error)
GetAzureVMInstanceState get vm instance state
func GetAzureVMPrivateIP ¶
func GetAzureVMPrivateIP(sess *AzureSession, rg, vmName string) (string, error)
GetAzureVMPrivateIP get Azure vm private IP
func GetAzureVMPublicIP ¶
func GetAzureVMPublicIP(sess *AzureSession, rg, vmName string) (string, error)
GetAzureVMPublicIP get azure vm public IP
func GetAzureVMPublicIPByNameRegex ¶
func GetAzureVMPublicIPByNameRegex(sess *AzureSession, rg, publicIPNameRegex string) (string, error)
GetAzureVMPublicIPByNameRegex returns the first public IP whose name matches the given regex
func GetClusterNodesBy ¶
GetClusterNodesBy returns the cluster nodes by role
func GetClusterNodesByRoleInHostedCluster ¶
GetClusterNodesByRoleInHostedCluster returns the cluster nodes by role
func GetClusterPrefixName ¶
GetClusterPrefixName return Cluster Prefix Name
func GetClusterVersion ¶
GetClusterVersion returns the cluster version as string value (Ex: 4.8) and cluster build (Ex: 4.8.0-0.nightly-2021-09-28-165247)
func GetContainerIDByPODName ¶
func GetCurrentTestPolarionIDNumber ¶
func GetCurrentTestPolarionIDNumber() string
GetCurrentTestPolarionIDNumber inspects the name of the test case and return the number of the polarion ID linked to this automated test case. It returns an empty string if no ID found.
func GetDeploymentConfigPods ¶
func GetDockerImageReference ¶
func GetDockerImageReference(c imagev1typedclient.ImageStreamInterface, name, tag string) (string, error)
GetDockerImageReference retrieves the full Docker pull spec from the given ImageStream and tag
func GetEndpointAddress ¶
GetEndpointAddress will return an "ip:port" string for the endpoint.
func GetFieldWithJsonpath ¶
func GetFieldWithJsonpath(oc *exutil.CLI, interval, timeout time.Duration, immediately, allowEmpty, asAdmin, withoutNamespace bool, parameters ...string) (string, error)
GetFieldWithJsonpath gets the field of the resource per jsonpath interval and timeout is the inveterl and timeout of Poll immediately means if it wait first interval and then get allowEmpty means if the result allow empty string asAdmin means oc.AsAdmin() or not withoutNamespace means oc.WithoutNamespace() or not. for example, it is to get clusterresource GetFieldWithJsonpath(oc, 3*time.Second, 150*time.Second, exutil.NotImmediately, exutil.NotAllowEmpty, exutil.AsAdmin, exutil.WithoutNamespace, "operator", name, "-o", "jsonpath={.status}") if you want to get ns resource, could be GetFieldWithJsonpath(oc, 3*time.Second, 150*time.Second, exutil.NotImmediately, exutil.NotAllowEmpty, exutil.AsAdmin, exutil.WithoutNamespace, "-n", ns, "pod", name, "-o", "jsonpath={.status}") or if the ns is same to oc.Namespace, could be GetFieldWithJsonpath(oc, 3*time.Second, 150*time.Second, exutil.NotImmediately, exutil.AllowEmpty, exutil.AsAdmin, exutil.WithoutNamespace, "pod", name, "-o", "jsonpath={.status}")
func GetFileContent ¶
Get file content in test/extended/testdata/<basedir>/<name>
func GetFirstCoreOsWorkerNode ¶
GetFirstCoreOsWorkerNode returns the first CoreOS worker node
func GetFirstLinuxMachineSets ¶
GetFirstLinuxMachineSets used for getting first linux worker nodes name
func GetFirstLinuxWorkerNode ¶
GetFirstLinuxWorkerNode returns the first linux worker node in the cluster
func GetFirstLinuxWorkerNodeInHostedCluster ¶
GetFirstLinuxWorkerNodeInHostedCluster returns the first linux worker node in the cluster
func GetFirstMasterNode ¶
GetFirstMasterNode returns a first master node
func GetFirstRhelWorkerNode ¶
GetFirstRhelWorkerNode returns the first rhel worker node
func GetFirstWorkerNode ¶
GetFirstWorkerNode returns a first worker node
func GetFirstWorkerNodeByNodePoolNameInHostedCluster ¶
func GetFirstWorkerNodeByNodePoolNameInHostedCluster(oc *exutil.CLI, nodePoolName string) (string, error)
GetFirstWorkerNodeByNodePoolNameInHostedCluster returns the first linux worker node in the cluster
func GetGcpProjectID ¶
GetGcpProjectID returns the gcp project id
func GetHostedClusterVersion ¶
func GetHostedClusterVersion(mgmtOc *exutil.CLI, hostedClusterName, hostedClusterNs string) semver.Version
GetHostedClusterVersion gets a HostedCluster's version from the management cluster.
func GetHyperShiftHostedClusterNameSpace ¶
GetHyperShiftHostedClusterNameSpace get hypershift hostedcluster namespace if not exist, it will return empty string. If more than one exists, it will return the first one.
func GetHyperShiftOperatorNameSpace ¶
GetHyperShiftOperatorNameSpace get hypershift operator namespace if not exist, it will return empty string.
func GetIBMCredentialFromCluster ¶
GetIBMCredentialFromCluster gets IBM credentials like ibmapikey, ibmvpc, and ibmregion from the cluster
func GetIBMInstanceID ¶
func GetIBMInstanceID(session *IBMSession, oc *exutil.CLI, region string, vpcName string, instanceID string, baseDomain string) (string, error)
GetIBMInstanceID get IBM instance id
func GetIBMInstanceStatus ¶
func GetIBMInstanceStatus(session *IBMSession, instanceID string) (string, error)
GetIBMInstanceStatus check IBM instance running status
func GetIBMPowerVsCloudID ¶
GetIBMPowerVsCloudID get powervsCloud Id
func GetIBMPowerVsInstanceInfo ¶
func GetIBMPowerVsInstanceInfo(powerClient *IBMPowerVsSession, instanceName string) (string, string, error)
GetInstanceInfo retrieves information for the specified instance name
func GetIBMRegion ¶
GetIBMRegion gets IBM cluster region
func GetIBMResourceGrpName ¶
GetIBMResourceGrpName get IBM cluster resource group name
func GetIPVersionStackType ¶
GetIPVersionStackType gets IP-version Stack type of the cluster
func GetImageIDForTags ¶
GetImageIDForTags will obtain the hexadecimal IDs for the array of human readible image tags IDs provided
func GetImagestreamImageName ¶
GetImagestreamImageName Return an imagestream's image repository name
func GetLastLinuxWorkerNode ¶
GetLastLinuxWorkerNode return last worker node
func GetLatest4StableImage ¶
GetLatest4StableImage to get the latest 4-stable OCP image from releasestream link Return OCP image for sample quay.io/openshift-release-dev/ocp-release:4.11.0-fc.0-x86_64
func GetLatest4StableImageByStream ¶
GetLatest4StableImageByStream to get the latest 4-stable OCP image from a specifed releasestream link GetLatest4StableImageByStream("multi", "4-stable-multi/latest?in=>4.16.0-0+<4.17.0-0") GetLatest4StableImageByStream("amd64", "4-stable/latest")
func GetLatestImage ¶
GetLatestImage retrieves the pull spec of the latest image satisfying the arch - product - stream combination. arch = "amd64", "arm64", "ppc64le", "s390x", "multi" product = "ocp", "origin" (i.e. okd, which only supports the amd64 architecture) Possible values for the stream parameter depend on arch and product. See https://docs.ci.openshift.org/docs/getting-started/useful-links/#services for relevant release status pages.
Examples: GetLatestImage("amd64", "ocp", "4.14.0-0.nightly") GetLatestImage("arm64", "ocp", "4.14.0-0.nightly-arm64") GetLatestImage("amd64", "origin", "4.14.0-0.okd")
func GetLatestNightlyImage ¶
GetLatestNightlyImage to get the latest nightly OCP image from releasestream link Input parameter release: OCP release version such as 4.11, 4.9, ..., 4.6 Return OCP image
func GetLatestReleaseImageFromEnv ¶
func GetLatestReleaseImageFromEnv() string
func GetMachineSetInstanceType ¶
GetMachineSetInstanceType used to get first machineset instance type
func GetMasterThreadDump ¶
GetMasterThreadDump will get a golang thread stack dump
func GetMirrorRegistry ¶
GetMirrorRegistry returns mirror registry from icsp
func GetMustGatherFileName ¶
func GetMustGatherFileName() string
GetMustGatherFileName Get the name of the must-gather file for the current test case
func GetNFDInstanceImage ¶
GetNFDInstanceImage return correct image name in manifest channel
func GetNFDVersionbyPackageManifest ¶
GetNFDVersionbyPackageManifest return NFD version
func GetNodeArchByName ¶
GetNodeArchByName gets the node arch by its name
func GetNodeHostname ¶
GetNodeHostname returns the cluster node hostname
func GetNodeListByLabel ¶
GetNodeListByLabel gets the node list by label
func GetNodeNameByMachineset ¶
GetNodeNameByMachineset used for get node name by machineset name
func GetNodePoolNamesbyHostedClusterName ¶
func GetNodePoolNamesbyHostedClusterName(oc *exutil.CLI, hostedClusterName, hostedClusterNS string) []string
GetNodePoolNamesbyHostedClusterName gets the nodepools names of the hosted cluster
func GetNutanixCredFromCluster ¶
GetNutanixCredentialFromCluster gets nutanix credentials from cluster
func GetNutanixCredentialFromCluster ¶
GetNutanixCredentialFromCluster gets credentials like username, password, and endpoint URL from the cluster
func GetNutanixHostromCluster ¶
GetNutanixHostromCluster Gets nutanix [Host]:port from cluster
func GetOIDCProvider ¶
GetOIDCProvider returns the OIDC provider for current cluster
func GetOpenStackUserIDAndDomainID ¶
func GetOpenStackUserIDAndDomainID(cred *OpenstackCredentials) (string, string)
GetOpenStackUserIDAndDomainID returns the user ID and domain ID
func GetOperatorPKGManifestDefaultChannel ¶
func GetOperatorPKGManifestDefaultChannel(oc *exutil.CLI, pkgManifestName, namespace string) (string, error)
GetOperatorPKGManifestDefaultChannel to getting operator Packagemanifest default channel
func GetOperatorPKGManifestSource ¶
func GetOperatorPKGManifestSource(oc *exutil.CLI, pkgManifestName, namespace string) (string, error)
GetOperatorPKGManifestSource used for getting operator Packagemanifest source name
func GetPODCPUSet ¶
func GetPodForContainer ¶
GetPodForContainer creates a new Pod that runs specified container
func GetPodLogs ¶
GetPodLogs retrieves logs from a pod
func GetPodName ¶
GetPodName returns the pod name
func GetPodNameInHostedCluster ¶
func GetPodNameInHostedCluster(oc *exutil.CLI, namespace string, podLabel string, node string) (string, error)
GetPodNameInHostedCluster returns the pod name in hosted cluster of hypershift
func GetPodNamesByFilter ¶
func GetPodNamesByFilter(c corev1client.PodInterface, label labels.Selector, predicate func(kapiv1.Pod) bool) (podNames []string, err error)
GetPodNamesByFilter looks up pods that satisfy the predicate and returns their names.
func GetPodNodeName ¶
GetPodNodeName returns the name of the node the given pod is running on
func GetPodsNodesMap ¶
GetPodsNodesMap returns all the running pods in each node
func GetPrivateKey ¶
func GetPublicKey ¶
func GetPullSec ¶
Extract pull secrect from cluster
func GetRDU2HostsList ¶
GetRDU2HostsList returns the singleton instance of RDU2Hosts map It initializes the singleton on first call by reading the hosts.yaml file Returns a copy of the map to prevent external modifications
func GetRHCOSImageURLForAzureDisk ¶
func GetRHCOSImageURLForAzureDisk(oc *exutil.CLI, releaseImage string, pullSecretFile string, arch CoreOSImageArch) (string, error)
GetRHCOSImageURLForAzureDisk retrieves the RHCOS URL for the specified architecture's Azure disk image
func GetReleaseImage ¶
GetReleaseImage returns the release image as string value (Ex: registry.ci.openshift.org/ocp/release@sha256:b13971e61312f5dddd6435ccf061ac1a8447285a85828456edcd4fc2504cfb8f)
func GetRelicasByMachinesetName ¶
GetRelicasByMachinesetName used for get replicas number by machineset name
func GetRemainingResourcesNodesMap ¶
GetRemainingResourcesNodesMap returns the total remaning CPU and Memory in each node
func GetRequestedResourcesNodesMap ¶
GetRequestedResourcesNodesMap returns the total requested CPU and Memory in each node
func GetResourceSpecificLabelValue ¶
func GetResourceSpecificLabelValue(oc *exutil.CLI, resourceKindAndName string, resourceNamespace string, labelName string) (string, error)
GetResourceSpecificLabelValue gets the specified label value from the resource and label name
func GetRouterPodTemplate ¶
GetRouterPodTemplate finds the router pod template across different namespaces, helping to mitigate the transition from the default namespace to an operator namespace.
func GetSAToken ¶
GetSAToken get a token assigned to prometheus-k8s from openshift-monitoring namespace According to 2093780, the secret prometheus-k8s-token is removed from sa prometheus-k8s. So from 4.11, command <oc sa get-token prometheus-k8s -n openshift-monitoring> won't work Please install oc client and cluster with same major version.
func GetSchedulableLinuxWorkerNodes ¶
GetSchedulableLinuxWorkerNodes returns a group of nodes that match the requirements: os: linux, role: worker, status: ready, schedulable
func GetSpecificPodLogs ¶
func GetSpecificPodLogs(oc *exutil.CLI, namespace string, container string, podName string, filter string) (string, error)
GetSpecificPodLogs returns the pod logs by the specific filter
func GetSpecificPodLogsCombinedOrNot ¶
func GetSpecificPodLogsCombinedOrNot(oc *exutil.CLI, namespace string, container string, podName string, filter string, combined bool) (string, error)
GetSpecificPodLogsCombinedOrNot returns the pod logs by the specific filter with combining stderr or not
func GetStatefulSetPods ¶
func GetUserAssignedIdentityPrincipalID ¶
func GetUserAssignedIdentityPrincipalID(sess *AzureSession, resourceGroup string, identityName string) (string, error)
GetUserAssignedIdentityPrincipalID get user assigned identity PrincipalID
func GetUserCAToFile ¶
GetUserCA dump user certificate from user-ca-bundle configmap to File
func GrantRoleToPrincipalIDByResourceGroup ¶
func GrantRoleToPrincipalIDByResourceGroup(sess *AzureSession, principalID string, resourceGroup string, roleId string) (roleAssignmentName string, scope string)
GrantRoleToPrincipalIDByResourceGroup grant role to principalID by resource group
func ImplStringArrayContains ¶
fuction to check given string is in array or not
func InitDefaultEnvironmentVariables ¶
func InitDefaultEnvironmentVariables()
ProwGCPSetup makes sure certain required env vars are available in the case that extended tests are invoked directly via calls to ginkgo/extended.test
func InitStandardFlags ¶
func InitStandardFlags()
func InstallNFD ¶
InstallNFD attempts to install the Node Feature Discovery operator and verify that it is running
func InstallPAO ¶
InstallPAO attempts to install the Performance Add-On operator and verify that it is running
func Is3MasterNoDedicatedWorkerNode ¶
Is3MasterNoDedicatedWorkerNode reture if the OCP have three master/worker node, but no dedicated worker node.
func IsAKSCluster ¶
IsAKSCluster checks if the active cluster is an AKS (Azure Kubernetes Service) cluster or not
func IsArbiterCluster ¶
A two-node-arbiter OpenShift cluster is a special type of high availability (HA) deployment designed to run in edge environments
func IsBase64Encoded ¶
IsBase64Encoded checks if the input string is likely base64-encoded.
func IsClusterOperated ¶
func IsDefaultNodeSelectorEnabled ¶
IsDefaultNodeSelectorEnabled judges whether the test cluster enabled the defaultNodeSelector
func IsDeploymentReady ¶
func IsDeploymentReady(deploy *appsv1.Deployment) bool
IsDeploymentReady checks if an *appsv1.Deployment is ready
func IsExternalOIDCCluster ¶
IsExternalOIDCCluster checks if the cluster is using external OIDC.
func IsHypershiftHostedCluster ¶
IsHypershiftHostedCluster
func IsInfrastructuresHighlyAvailable ¶
IsInfrastructuresHighlyAvailable check if it is HighlyAvailable for infrastructures. Available for both classic OCP and the hosted cluster.
func IsKeycloakExtOIDCCluster ¶
func IsKeycloakExtOIDCCluster() bool
IsKeycloakExtOIDCCluster assumes the cluster uses external oidc auth but checks if the oidc issuer is Keycloak.
func IsMachineSetExist ¶
IsMachineSetExist check if machineset exist in OCP
func IsNamespacePrivileged ¶
IsNamespacePrivileged checks if a namespace has privileged SCC
func IsNodeLabeledByNFD ¶
IsNodeLabeledByNFD Check if NFD Installed base on the cluster labels
func IsOpenShiftCluster ¶
func IsOpenShiftCluster(ctx context.Context, c corev1client.NamespaceInterface) (bool, error)
IsOpenShiftCluster checks if the active cluster is OpenShift or a derivative
func IsPAOInOperatorHub ¶
IsPAOInOperatorHub used for checking if PAO exist in OperatorHub
func IsPAOInstalled ¶
IsPAOInstalled used for deploying Performance Add-on Operator
func IsROSACluster ¶
IsROSACluster checks if the cluster is running on ROSA
func IsSNOCluster ¶
IsSNOCluster will check if OCP is a single node cluster
func IsSTSCluster ¶
IsSTSCluster determines if an AWS cluster is using STS
func IsSpecifiedAnnotationKeyExist ¶
func IsSpecifiedAnnotationKeyExist(oc *exutil.CLI, resourceKindAndName, resourceNamespace, annotationKey string) bool
IsSpecifiedAnnotationKeyExist judges whether the specified annotationKey exist on the resource
func IsTechPreviewNoUpgrade ¶
IsTechPreviewNoUpgrade checks if a cluster is a TechPreviewNoUpgrade cluster
func IsWorkerNode ¶
IsWorkerNode judges whether the node has the worker role
func IsWorkloadIdentityCluster ¶
IsWorkloadIdentityCluster judges whether the Azure/GCP cluster is using the Workload Identity
func KubeConfigPath ¶
func KubeConfigPath() string
KubeConfigPath returns the value of KUBECONFIG environment variable
func LDAPClientMounts ¶
func LDAPClientMounts() ([]corev1.VolumeMount, []corev1.Volume)
func LaunchWebserverPod ¶
LaunchWebserverPod launches a pod serving http on port 8080 to act as the target for networking connectivity checks. The ip address of the created pod will be returned if the pod is launched successfully.
func ListGCSBuckets ¶
ListGCSBuckets gets all the bucket names under the projectID
func ListImages ¶
ListImages initiates the equivalent of a `docker images`
func ListServersByName ¶
func ListServersByName(client *gophercloud.ServiceClient, instanceName string) ([]servers.Server, error)
ListServersByName retrieves a list of servers matching the given instance name.
func ModifyYamlFileContent ¶
func ModifyYamlFileContent(file string, replacements []YamlReplace)
ModifyYamlFileContent modify the content of YAML file given the file path and a list of YamlReplace struct. Example: ModifyYamlFileContent(file, []YamlReplace {
{
Path: 'spec.template.spec.imagePullSecrets',
Value: '- name: notmatch-secret',
},
})
func MoveFileToPath ¶
MoveFileToPath attempts to move a file from srcPath to destPath.
func MustGetAzureCredsLocation ¶
func MustGetAzureCredsLocation() string
func NewAzureContainerClient ¶
func NewAzureContainerClient(oc *exutil.CLI, accountName, accountKey, azContainerName string) (azblob.ContainerURL, error)
NewAzureContainerClient initializes a new azure blob container client
func NewCLI ¶
NewCLI initialize the upstream E2E framework and set the namespace to match with the project name. Note that this function does not initialize the project role bindings for the namespace.
func NewCLIForKube ¶
NewCLIForKube initializes the exutil.CLI for tests against pure Kubernetes environments
func NewCLIForKubeOpenShift ¶
NewCLIForKubeOpenShift provides a exutil.CLI that detects Kubernetes or OpenShift
func NewCLIWithoutNamespace ¶
NewCLIWithoutNamespace initializes the upstream E2E framework in a non-namespaced context. Most commonly used for global object (non-namespaced) tests.
func NewOpenStackClient ¶
func NewOpenStackClient(cred *OpenstackCredentials, serviceType string) *gophercloud.ServiceClient
func NewPodExecutor ¶
NewPodExecutor returns an executor capable of running commands in a Pod.
func NewRuleResolver ¶
func NewRuleResolver(informers rbacinformers.Interface) rbacregistryvalidation.AuthorizationRuleResolver
func OrFail ¶
OrFail function will process another function's return values and fail if any of those returned values is ane error != nil and returns the first value example: if we have: func getValued() (string, error)
we can do: value := OrFail[string](getValue())
func ParameterizedTemplateByReplaceToFile ¶
ParameterizedTemplateByReplaceToFile parameterize template to new file
func ParseLabelsOrDie ¶
ParseLabelsOrDie turns the given string into a label selector or panics; for tests or other cases where you know the string is valid. TODO: Move this to the upstream labels package.
func PathExists ¶
PathExists @Description Check if a file exists @Create jianl Jan 22 2025 @Param path string the file path @Return (bool, error)
func PerformInstanceActionOnPowerVs ¶
func PerformInstanceActionOnPowerVs(powerClient *IBMPowerVsSession, instanceID, action string) error
PerformInstanceActionOnPowerVs performs start or stop action on the instance
func PreDetermineExternalOIDCCluster ¶
PreDetermineExternalOIDCCluster checks if the cluster is using external OIDC preflight to avoid to check it everytime.
func PreDetermineK8sCluster ¶
PreDetermineK8sCluster checks if the active cluster is a Kubernetes cluster (as opposed to OpenShift).
func PreSetEnvK8s ¶
func PreSetEnvK8s() (res string)
func PreSetEnvOIDCCluster ¶
func PreSetEnvOIDCCluster() (res string)
func PreTestDump ¶
func PreTestDump()
func ProcessAzurePages ¶
func ProcessTemplate ¶
ProcessTemplate process template given file path and parameters
func ROSAValidHypershiftAndGetGuestKubeConf ¶
ROSAValidHypershiftAndGetGuestKubeConf check if it is ROSA-hypershift env and get kubeconf of the hosted cluster, only support prow the first return is hosted cluster name the second return is the file of kubeconfig of the hosted cluster the third return is the hostedcluster namespace in mgmt cluster which contains the generated resources if it is not hypershift env, it will skip test.
func RandStrCustomize ¶
RandStrCustomize This is a utility function for random strings n: random strings' length, s: Customizable String Sets
func RandStrDefault ¶
func RandStrDefault() string
RandStrDefault This is a utility function for random strings random strings' length=8
func ReadFixtureOrFail ¶
func ReadLDAPServerTestData ¶
func RecoverNamespaceRestricted ¶
RecoverNamespaceRestricted recovers a namespace to restricted mode
func RemoteShContainer ¶
func RemoteShContainer(oc *exutil.CLI, namespace string, podName string, container string, cmd ...string) (string, error)
RemoteShContainer creates a remote shell of the given container inside the pod
func RemoteShPod ¶
RemoteShPod creates a remote shell of the pod
func RemoteShPodWithBash ¶
func RemoteShPodWithBash(oc *exutil.CLI, namespace string, podName string, cmd ...string) (string, error)
RemoteShPodWithBash creates a remote shell of the pod with bash
func RemoteShPodWithBashSpecifyContainer ¶
func RemoteShPodWithBashSpecifyContainer(oc *exutil.CLI, namespace string, podName string, containerName string, cmd ...string) (string, error)
RemoteShPodWithBashSpecifyContainer creates a remote shell of the pod with bash specifying container name
func RemoteShPodWithChroot ¶
func RemoteShPodWithChroot(oc *exutil.CLI, namespace string, podName string, cmd ...string) (string, error)
RemoteShPodWithChroot creates a remote shell of the pod with chroot
func RemoveAnnotationFromSpecificResource ¶
func RemoveAnnotationFromSpecificResource(oc *exutil.CLI, resourceKindAndName, resourceNamespace string, annotationName string) (string, error)
RemoveAnnotationFromSpecificResource removes the specified annotation from the resource
func RemoveDeploymentConfigs ¶
RemoveDeploymentConfigs deletes the given DeploymentConfigs in a namespace
func RemovePodsWithPrefixes ¶
RemovePodsWithPrefixes deletes pods whose name begins with the supplied prefixes
func RemoveStatefulSets ¶
RemoveStatefulSets deletes the given stateful sets in a namespace
func RunOneShotCommandPod ¶
func RunOneShotCommandPod( oc *exutil.CLI, name, image, command string, volumeMounts []corev1.VolumeMount, volumes []corev1.Volume, env []corev1.EnvVar, timeout time.Duration, ) (string, []error)
RunOneShotCommandPod runs the given command in a pod and waits for completion and log output for the given timeout duration, returning the command output or an error. TODO: merge with the PodExecutor above
func Secure ¶
func Secure(securedMatcher types.GomegaMatcher) types.GomegaMatcher
func SetNamespacePrivileged ¶
SetNamespacePrivileged sets a namespace to use privileged SCC
func SetVPCServiceURLForRegion ¶
func SetVPCServiceURLForRegion(session *IBMSession, region string) error
SetVPCServiceURLForRegion will set the VPC Service URL to a specific IBM Cloud Region, in order to access Region scoped resources
func SetupK8SNFSServerAndVolume ¶
func SetupK8SNFSServerAndVolume(oc *exutil.CLI, count int) (*kapiv1.Pod, []*kapiv1.PersistentVolume, error)
SetupK8SNFSServerAndVolume sets up an nfs server pod with count number of persistent volumes
func SkipBaselineCaps ¶
SkipBaselineCaps skip the test if cluster has no required resources. sets is comma separated list of baselineCapabilitySets to skip. for example: "None, v4.11"
func SkipForSNOCluster ¶
SkipForSNOCluster skip for SNO cluster
func SkipIfCapEnabled ¶
SkipIfCapEnabled skips the test if a capability is enabled
func SkipIfDisableDefaultCatalogsource ¶
Skip the test if default catsrc is disable
func SkipIfPlatformTypeNot ¶
SkipIfPlatformTypeNot skips all platforms other than supported platforms is comma separated list of allowed platforms for example: "gcp, aws"
func SkipMissingQECatalogsource ¶
Skip the test if there is not catalogsource/qe-app-registry in the cluster
func SkipNoBuild ¶
SkipNoBuild skip the test if the cluster has no Build component
func SkipNoCapabilities ¶
SkipNoCapabilities skip the test if the cluster has no one capability
func SkipNoDefaultSC ¶
SkipNoDefaultSC skip the test if cluster has no default storageclass or has more than 1 default storageclass
func SkipNoDeploymentConfig ¶
SkipNoDeploymentConfig skip the test if the cluster has no DeploymentConfig component
func SkipNoImageRegistry ¶
SkipNoImageRegistry skip the test if the cluster has no ImageRegistry component
func SkipNoOLMCore ¶
SkipNoOLMCore skip the test if the cluster has no OLM component from 4.15, OLM become optional core component. it means there is no OLM component for some profiles. so, the OLM case and optioinal operator case can not run on such cluster.
func SkipNoOLMv1Core ¶
func SkipOnOpenShiftNess ¶
func SkipOnOpenShiftNess(expectOpenShift bool)
SkipOnOpenShiftNess skips the test if the cluster type doesn't match the expected type.
func SpecifyMachinesetWithDifferentInstanceType ¶
SpecifyMachinesetWithDifferentInstanceType used for specify cpu type that different from default one
func StartAzureStackVM ¶
StartAzureStackVM starts the virtual machine with the given name in the specified resource group using Azure exutil.CLI
func StartAzureVM ¶
func StartAzureVM(sess *AzureSession, vmName string, resourceGroupName string) (osr autorest.Response, err error)
StartAzureVM starts the selected VM
func StartBuild ¶
StartBuild executes OC start-build with the specified arguments. StdOut and StdErr from the process are returned as separate strings.
func StartIBMInstance ¶
func StartIBMInstance(session *IBMSession, instanceID string) error
StartIBMInstance start the IBM instance
func StopAzureStackVM ¶
StopAzureStackVM stops the virtual machine with the given name in the specified resource group using Azure exutil.CLI
func StopAzureVM ¶
func StopAzureVM(sess *AzureSession, vmName string, resourceGroupName string) (osr autorest.Response, err error)
StopAzureVM stops the selected VM
func StopIBMInstance ¶
func StopIBMInstance(session *IBMSession, instanceID string) error
StopIBMInstance stop the IBM instance
func StringsSliceContains ¶
StringsSliceContains judges whether the strings Slice contains specific element, return bool and the first matched index If no matched return (false, 0)
func StringsSliceElementsAddSuffix ¶
StringsSliceElementsAddSuffix returns a new string slice all elements with the specific suffix added
func StringsSliceElementsHasPrefix ¶
func StringsSliceElementsHasPrefix(stringsSlice []string, elementPrefix string, sequentialFlag bool) (bool, int)
StringsSliceElementsHasPrefix judges whether the strings Slice contains an element which has the specific prefix returns bool and the first matched index sequential order: -> sequentialFlag: "true" reverse order: -> sequentialFlag: "false" If no matched return (false, 0)
func TimedWaitForAnImageStreamTag ¶
func TimedWaitForAnImageStreamTag(oc *exutil.CLI, namespace, name, tag string, waitTimeout time.Duration) error
TimedWaitForAnImageStreamTag waits until an image stream with given name has non-empty history for given tag. Gives up waiting after the specified waitTimeout
func UpdateFile ¶
func UpdateFile(filePath string, stringPairs []StringPairs) (err error)
updateFile @Description Replace oldString in a given file by newString @Create jianl Jan 22 2025 @Param filePath string the file path @Param stringPairs StringPairs a list of struct of old string and new string @Return nil
func ValidHypershiftAndGetGuestKubeConf ¶
ValidHypershiftAndGetGuestKubeConf check if it is hypershift env and get kubeconf of the hosted cluster the first return is hosted cluster name the second return is the file of kubeconfig of the hosted cluster the third return is the hostedcluster namespace in mgmt cluster which contains the generated resources if it is not hypershift env, it will skip test.
func ValidHypershiftAndGetGuestKubeConf4SecondHostedCluster ¶
func ValidHypershiftAndGetGuestKubeConf4SecondHostedCluster(oc *exutil.CLI) (string, string, string)
ValidHypershiftAndGetGuestKubeConf4SecondHostedCluster check if it is hypershift env and get kubeconf of the hosted cluster the first return is hosted cluster name the second return is the file of kubeconfig of the hosted cluster the third return is the hostedcluster namespace in mgmt cluster which contains the generated resources if it is not hypershift env, it will skip test.
func ValidHypershiftAndGetGuestKubeConfWithNoSkip ¶
ValidHypershiftAndGetGuestKubeConfWithNoSkip check if it is hypershift env and get kubeconf of the hosted cluster the first return is hosted cluster name the second return is the file of kubeconfig of the hosted cluster the third return is the hostedcluster namespace in mgmt cluster which contains the generated resources if it is not hypershift env, it will not skip the testcase and return null string.
func VarSubOnFile ¶
VarSubOnFile reads in srcFile, finds instances of ${key} from the map and replaces them with their associated values.
func WaitAndGetSpecificPodLogs ¶
func WaitAndGetSpecificPodLogs(oc *exutil.CLI, namespace string, container string, podName string, filter string) (string, error)
WaitAndGetSpecificPodLogs wait and return the pod logs by the specific filter
func WaitForABuild ¶
func WaitForABuild(c buildv1clienttyped.BuildInterface, name string, isOK, isFailed, isCanceled func(*buildv1.Build) bool) error
WaitForABuild waits for a Build object to match either isOK or isFailed conditions.
func WaitForAJob ¶
func WaitForAJob(c batchv1client.JobInterface, name string, timeout time.Duration) error
func WaitForAnImageStream ¶
func WaitForAnImageStream(client imagev1typedclient.ImageStreamInterface, name string, isOK, isFailed func(*imagev1.ImageStream) bool) error
WaitForAnImageStream waits for an ImageStream to fulfill the isOK function
func WaitForAnImageStreamTag ¶
WaitForAnImageStreamTag waits until an image stream with given name has non-empty history for given tag. Defaults to waiting for 300 seconds
func WaitForBuildResult ¶
func WaitForBuildResult(c buildv1clienttyped.BuildInterface, result *BuildResult) error
WaitForBuildResult updates result wit the state of the build
func WaitForDeploymentConfig ¶
func WaitForDeploymentConfig(kc kubernetes.Interface, dcClient appsv1clienttyped.DeploymentConfigsGetter, namespace, name string, version int64, enforceNotProgressing bool, cli *exutil.CLI) error
WaitForDeploymentConfig waits for a DeploymentConfig to complete transition to a given version and report minimum availability.
func WaitForDeploymentsReady ¶
func WaitForDeploymentsReady(ctx context.Context, listDeployments func(ctx context.Context) (*appsv1.DeploymentList, error), isDeploymentReady func(*appsv1.Deployment) bool, timeout, interval time.Duration, printDebugInfo bool)
WaitForDeploymentsReady polls listDeployments() until deployments obtained are ready
func WaitForEndpoint ¶
func WaitForEndpoint(c kclientset.Interface, ns, name string) error
func WaitForHypershiftHostedClusterReady ¶
WaitForHypershiftHostedClusterReady waits for the hostedCluster ready
func WaitForInternalRegistryHostname ¶
WaitForInternalRegistryHostname waits for the internal registry hostname to be made available to the cluster.
func WaitForNoPodsAvailable ¶
WaitForNoPodsAvailable waits until there are no pods in the given namespace
func WaitForNoPodsAvailableByKind ¶
WaitForNoPodsAvailableByKind used for checking no pods in a certain namespace
func WaitForNodeToDisappear ¶
func WaitForOpenShiftNamespaceImageStreams ¶
WaitForOpenShiftNamespaceImageStreams waits for the standard set of imagestreams to be imported
func WaitForPods ¶
func WaitForPods(c corev1client.PodInterface, label labels.Selector, predicate func(kapiv1.Pod) bool, count int, timeout time.Duration) ([]string, error)
WaitForPods waits until given number of pods that match the label selector and satisfy the predicate are found
func WaitForQueryOutputContains ¶
func WaitForQueryOutputContains(oc *exutil.CLI, d Database, timeout time.Duration, admin bool, query, resultSubstr string) error
WaitForQueryOutputContains will execute the query multiple times, until the specified substring is found in the results. This function should be used for testing replication, since it might take some time until the data is propagated to slaves.
func WaitForQueryOutputSatisfies ¶
func WaitForQueryOutputSatisfies(oc *exutil.CLI, d Database, timeout time.Duration, admin bool, query string, predicate func(string) bool) error
WaitForQueryOutputSatisfies will execute the query multiple times, until the specified predicate function is return true.
func WaitForResourceQuotaSync ¶
func WaitForResourceQuotaSync( client corev1client.ResourceQuotaInterface, name string, expectedUsage corev1.ResourceList, expectedIsUpperLimit bool, timeout time.Duration, ) (corev1.ResourceList, error)
WaitForResourceQuotaSync watches given resource quota until its usage is updated to desired level or a timeout occurs. If successful, used quota values will be returned for expected resources. Otherwise an ErrWaitTimeout will be returned. If expectedIsUpperLimit is true, given expected usage must compare greater or equal to quota's usage, which is useful for expected usage increment. Otherwise expected usage must compare lower or equal to quota's usage, which is useful for expected usage decrement.
func WaitForResourceUpdate ¶
func WaitForResourceUpdate(ctx context.Context, oc *exutil.CLI, interval, timeout time.Duration, kindAndName, namespace, oldResourceVersion string) error
WaitForResourceUpdate waits for the resourceVersion of a resource to be updated
func WaitForSelfSAR ¶
func WaitForSelfSAR(interval, timeout time.Duration, c kclientset.Interface, selfSAR authorizationapiv1.SelfSubjectAccessReviewSpec) error
func WaitForServiceAccount ¶
func WaitForServiceAccount(c corev1client.ServiceAccountInterface, name string, checkSecret bool) error
WaitForServiceAccount waits until the named service account gets fully provisioned
func WaitForUserBeAuthorized ¶
WaitForUserBeAuthorized waits a minute until the cluster bootstrap roles are available and the provided user is authorized to perform the action on the resource.
func WaitOprResourceReady ¶
func WaitOprResourceReady(oc *exutil.CLI, kind, name, namespace string, islongduration bool, excludewinnode bool)
WaitOprResourceReady used for checking if deployment/daemonset/statefulset is ready
func WaitUntilAllHelpersAreUp ¶
WaitUntilAllHelpersAreUp waits until all helpers are ready to serve requests.
func WaitUntilPodIsGone ¶
func WaitUntilPodIsGone(c corev1client.PodInterface, podName string, timeout time.Duration) error
WaitUntilPodIsGone waits until the named Pod will disappear
func WaitUntilUp ¶
WaitUntilUp continuously waits for the server to become ready, up until timeout.
Types ¶
type AWSInstanceNotFound ¶
type AWSInstanceNotFound struct{ InstanceName string }
AWSInstanceNotFound custom error for not found instances
func (*AWSInstanceNotFound) Error ¶
func (nfe *AWSInstanceNotFound) Error() string
Error implements the error interface
type AwsClient ¶
type AwsClient struct {
// contains filtered or unexported fields
}
AwsClient struct
func (*AwsClient) AssociateDhcpOptions ¶
AssociateDhcpOptions Associate a VPC with a dhcpOptions
func (*AwsClient) CreateDhcpOptions ¶
CreateDhcpOptions Create a dhcpOptions
func (*AwsClient) CreateDhcpOptionsWithDomainName ¶
CreateDhcpOptions Create a dhcpOptions with domainName
func (*AwsClient) CreateSecurityGroup ¶
func (*AwsClient) DeleteDhcpOptions ¶
DeleteDhcpOptions Delete a dhcpOptions
func (*AwsClient) DeleteSecurityGroup ¶
func (*AwsClient) DescribeTags ¶
func (a *AwsClient) DescribeTags(resourceType string, resourceId string) (*ec2.DescribeTagsOutput, error)
DescribeTags retrieves the AWS tags associated with the specified resource type and resourceId. The resourceType should be a valid AWS resource type (e.g., "instance", "volume"), and resourceId should be the unique identifier of the AWS resource.
It returns a EC2 DescribeTagsOutput and an error if any occurred during the call. The DescribeTagsOutput can be converted to string by describeTagsOutput.String()
func (*AwsClient) DescribeVpcEndpoint ¶
func (a *AwsClient) DescribeVpcEndpoint(endpointID string) (*ec2.VpcEndpoint, error)
func (*AwsClient) GetAvailabilityZoneNames ¶
func (*AwsClient) GetAwsInstanceID ¶
GetAwsInstanceID Get int svc instance ID
func (*AwsClient) GetAwsInstanceIDFromHostname ¶
GetAwsInstanceIDFromHostname Get instance ID from hostname
func (*AwsClient) GetAwsInstanceState ¶
GetAwsInstanceState gives the instance state
func (*AwsClient) GetAwsInstanceVPCId ¶
GetAwsInstanceVPCId gives the instance vpcID
func (*AwsClient) GetAwsIntIPs ¶
GetAwsIntIPs get aws int ip
func (*AwsClient) GetAwsPrivateSubnetIDs ¶
GetAwsPrivateSubnetIDs get private subnet IDs
func (*AwsClient) GetAwsPublicSubnetID ¶
GetAwsPublicSubnetID get one regular public subnet ID in aws outpost mixed worker cluster
func (*AwsClient) GetDefaultSecurityGroupByVpcID ¶
func (a *AwsClient) GetDefaultSecurityGroupByVpcID(vpcID string) (*ec2.SecurityGroup, error)
func (*AwsClient) GetDhcpOptionsIDFromTag ¶
GetDhcpOptionsIDFromTag Get the dhcpOptionsID that have a tag
func (*AwsClient) GetDhcpOptionsIDOfVpc ¶
GetDhcpOptionsIDOfVpc Get VPC's dhcpOptionsID
func (*AwsClient) GetInstanceSecurityGroupIDs ¶
func (*AwsClient) GetPlacementGroupByName ¶
GetPlacementGroupByName Get placement group by group-name
func (*AwsClient) GetSecurityGroupByGroupID ¶
func (a *AwsClient) GetSecurityGroupByGroupID(groupID string) (*ec2.SecurityGroup, error)
func (*AwsClient) GetSecurityGroupByGroupName ¶
func (a *AwsClient) GetSecurityGroupByGroupName(groupName string) (*ec2.SecurityGroup, error)
func (*AwsClient) GetSecurityGroupsByVpcEndpointID ¶
func (a *AwsClient) GetSecurityGroupsByVpcEndpointID(endpointID string) ([]*ec2.SecurityGroupIdentifier, error)
func (*AwsClient) StartInstance ¶
StartInstance Start an instance
func (*AwsClient) StopInstance ¶
StopInstance Stop an instance
type AzureClientSet ¶
type AzureClientSet struct {
// Account information
SubscriptionID string
// contains filtered or unexported fields
}
AzureClientSet encapsulates Azure account information and multiple clients.
func NewAzureClientSet ¶
func NewAzureClientSet(subscriptionId string, tokenCredential azcore.TokenCredential) *AzureClientSet
func NewAzureClientSetWithCredsFromCanonicalFile ¶
func NewAzureClientSetWithCredsFromCanonicalFile() *AzureClientSet
NewAzureClientSetWithCredsFromCanonicalFile creates an AzureClientSet using credentials from the canonical file location defined by AZURE_CREDS_LOCATION.
func NewAzureClientSetWithCredsFromFile ¶
func NewAzureClientSetWithCredsFromFile(filePath string) *AzureClientSet
NewAzureClientSetWithCredsFromFile constructs an AzureClientSet with info gleaned from a file.
func NewAzureClientSetWithRootCreds ¶
func NewAzureClientSetWithRootCreds(oc *exutil.CLI) *AzureClientSet
NewAzureClientSetWithRootCreds constructs an AzureClientSet with info gleaned from the in-cluster root credential.
func (*AzureClientSet) CreateCapacityReservation ¶
func (cs *AzureClientSet) CreateCapacityReservation(ctx context.Context, capacityReservationGroupName string, capacityReservationName string, location string, resourceGroupName string, skuName string, zone string) error
CreateCapacityReservation create a capacity reservation
func (*AzureClientSet) CreateCapacityReservationGroup ¶
func (cs *AzureClientSet) CreateCapacityReservationGroup(ctx context.Context, capacityReservationGroupName string, resourceGroupName string, location string, zone string) (string, error)
CreateCapacityReservationGroup create a capacity reservation group
func (*AzureClientSet) CreateResourceGroup ¶
func (cs *AzureClientSet) CreateResourceGroup(ctx context.Context, resourceGroupName, region string) (armresources.ResourceGroupsClientCreateOrUpdateResponse, error)
Create an Azure resource group.
func (*AzureClientSet) CreateStorageAccount ¶
func (cs *AzureClientSet) CreateStorageAccount(ctx context.Context, resourceGroupName, storageAccountName, region string) (armstorage.AccountsClientListKeysResponse, error)
Creates Azure storage account.
func (*AzureClientSet) DeleteCapacityReservation ¶
func (cs *AzureClientSet) DeleteCapacityReservation(ctx context.Context, capacityReservationGroupName string, capacityReservationName string, resourceGroupName string) error
DeleteCapacityReservation delete capacity reservation
func (*AzureClientSet) DeleteCapacityReservationGroup ¶
func (cs *AzureClientSet) DeleteCapacityReservationGroup(ctx context.Context, capacityReservationGroupName string, resourceGroupName string) error
DeleteCapacityReservationGroup delete capacity reservation group
func (*AzureClientSet) DeleteResourceGroup ¶
func (cs *AzureClientSet) DeleteResourceGroup(ctx context.Context, rgName string) error
func (*AzureClientSet) DeleteStorageAccount ¶
func (cs *AzureClientSet) DeleteStorageAccount(ctx context.Context, resourceGroupName, storageAccountName string)
Delete the created storage account.
func (*AzureClientSet) GetCapacityReservationGroupClient ¶
func (cs *AzureClientSet) GetCapacityReservationGroupClient(options *arm.ClientOptions) *armcompute.CapacityReservationGroupsClient
GetCapacityReservationGroupClient get capacity reservation group Client
func (*AzureClientSet) GetCapacityReservationsClient ¶
func (cs *AzureClientSet) GetCapacityReservationsClient(options *arm.ClientOptions) *armcompute.CapacityReservationsClient
GetCapacityReservationsClient get capacity reservations client
func (*AzureClientSet) GetFeaturesClient ¶
func (cs *AzureClientSet) GetFeaturesClient(options *arm.ClientOptions) *armfeatures.Client
GetFeaturesClient get feature Client
func (*AzureClientSet) GetGraphServiceClient ¶
func (cs *AzureClientSet) GetGraphServiceClient(scopes []string) *msgraphsdkgo.GraphServiceClient
GetGraphServiceClient gets the graph service client from AzureClientSet, constructs it if necessary. Pass a nil slice to use the default scope.
func (*AzureClientSet) GetKeysClient ¶
func (cs *AzureClientSet) GetKeysClient(options *arm.ClientOptions) *armkeyvault.KeysClient
GetKeysClient gets the keys client from AzureClientSet, constructs it if necessary.
func (*AzureClientSet) GetResourceGroupClient ¶
func (cs *AzureClientSet) GetResourceGroupClient(options *arm.ClientOptions) *armresources.ResourceGroupsClient
GetResourceGroupClient gets the resource group client from the AzureClientSet, constructs it if necessary. Concurrent invocation of this method is safe only when AzureClientSet.resourceGroupsClient is non-nil, which is the case when the resourceGroupsClient is eagerly initialized.
func (*AzureClientSet) GetServicePrincipalObjectId ¶
func (*AzureClientSet) GetStorageAccountProperties ¶
func (cs *AzureClientSet) GetStorageAccountProperties(storageAccountName string, resourceGroupName string) armstorage.AccountsClientGetPropertiesResponse
func (*AzureClientSet) GetVaultsClient ¶
func (cs *AzureClientSet) GetVaultsClient(options *arm.ClientOptions) *armkeyvault.VaultsClient
GetVaultsClient gets the vaults client from AzureClientSet, constructs it if necessary.
func (*AzureClientSet) GetVirtualMachinesClient ¶
func (cs *AzureClientSet) GetVirtualMachinesClient(options *arm.ClientOptions) *armcompute.VirtualMachinesClient
GetVirtualMachinesClient gets the virtual machine client from AzureClientSet, constructs it if necessary.
func (*AzureClientSet) RegisterEncryptionAtHost ¶
func (cs *AzureClientSet) RegisterEncryptionAtHost(ctx context.Context) error
RegisterEncryptionAtHost enable EncryptionAtHost in azure
type AzureCredentials ¶
type AzureCredentials struct {
AzureClientID string `json:"azure_client_id,omitempty"`
AzureClientSecret string `json:"azure_client_secret,omitempty" sensitive:"true"`
AzureSubscriptionID string `json:"azure_subscription_id,omitempty"`
AzureTenantID string `json:"azure_tenant_id,omitempty"`
AzureResourceGroup string `json:"azure_resourcegroup,omitempty"`
AzureResourcePrefix string `json:"azure_resource_prefix,omitempty"`
AzureRegion string `json:"azure_region"`
// contains filtered or unexported fields
}
func NewEmptyAzureCredentials ¶
func NewEmptyAzureCredentials() *AzureCredentials
func (*AzureCredentials) GetFromClusterAndDecode ¶
func (ac *AzureCredentials) GetFromClusterAndDecode(oc *exutil.CLI) error
func (*AzureCredentials) SetSdkEnvVars ¶
func (ac *AzureCredentials) SetSdkEnvVars() error
SetSdkEnvVars sets some environment variables used by azure-sdk-for-go. See https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/azidentity/README.md#environment-variables.
func (*AzureCredentials) String ¶
func (ac *AzureCredentials) String() string
type AzureCredentialsFromFile ¶
type AzureCredentialsFromFile struct {
AzureClientID string `json:"clientId,omitempty"`
AzureClientSecret string `json:"clientSecret,omitempty" sensitive:"true"`
AzureSubscriptionID string `json:"subscriptionId,omitempty"`
AzureTenantID string `json:"tenantId,omitempty"`
}
func NewEmptyAzureCredentialsFromFile ¶
func NewEmptyAzureCredentialsFromFile() *AzureCredentialsFromFile
func (*AzureCredentialsFromFile) LoadFromFile ¶
func (ac *AzureCredentialsFromFile) LoadFromFile(filePath string) error
func (*AzureCredentialsFromFile) SetSdkEnvVars ¶
func (ac *AzureCredentialsFromFile) SetSdkEnvVars() error
SetSdkEnvVars sets some environment variables used by azure-sdk-for-go. See https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/azidentity/README.md#environment-variables.
func (*AzureCredentialsFromFile) String ¶
func (ac *AzureCredentialsFromFile) String() string
type AzureSession ¶
type AzureSession struct {
SubscriptionID string
Authorizer autorest.Authorizer
}
AzureSession is an object representing session for subscription
func NewAzureSessionFromEnv ¶
func NewAzureSessionFromEnv() (*AzureSession, error)
NewAzureSessionFromEnv new azure session from env credentials
type BucketEmptiness ¶
type BucketEmptiness bool
BucketEmptiness captures a S3 bucket's state of emptiness i.e. it is empty or not.
const ( BucketEmpty BucketEmptiness = true BucketNonEmpty BucketEmptiness = false )
func (BucketEmptiness) String ¶
func (be BucketEmptiness) String() string
type BuildResult ¶
type BuildResult struct {
// BuildPath is a resource qualified name (e.g. "build/test-1").
BuildPath string
// BuildName is the non-resource qualified name.
BuildName string
// StartBuildStdErr is the StdErr output generated by oc start-build.
StartBuildStdErr string
// StartBuildStdOut is the StdOut output generated by oc start-build.
StartBuildStdOut string
// StartBuildErr is the error, if any, returned by the direct invocation of the start-build command.
StartBuildErr error
// The buildconfig which generated this build.
BuildConfigName string
// Build is the resource created. May be nil if there was a timeout.
Build *buildv1.Build
// BuildAttempt represents that a Build resource was created.
// false indicates a severe error unrelated to Build success or failure.
BuildAttempt bool
// BuildSuccess is true if the build was finshed successfully.
BuildSuccess bool
// BuildFailure is true if the build was finished with an error.
BuildFailure bool
// BuildCancelled is true if the build was canceled.
BuildCancelled bool
// BuildTimeout is true if there was a timeout waiting for the build to finish.
BuildTimeout bool
// Alternate log dumper function. If set, this is called instead of 'oc logs'
LogDumper LogDumperFunc
// The openshift client which created this build.
Oc *exutil.CLI
}
func NewBuildResult ¶
func NewBuildResult(oc *exutil.CLI, build *buildv1.Build) *BuildResult
func StartBuildAndWait ¶
func StartBuildAndWait(oc *exutil.CLI, args ...string) (result *BuildResult, err error)
StartBuildAndWait executes OC start-build with the specified arguments on an existing buildconfig. Note that start-build will be run with "-o=name" as a parameter when using this method. If no error is returned from this method, it means that the build attempted successfully, NOT that the build completed. For completion information, check the BuildResult object.
func StartBuildResult ¶
func StartBuildResult(oc *exutil.CLI, args ...string) (result *BuildResult, err error)
func (*BuildResult) AssertFailure ¶
func (t *BuildResult) AssertFailure() *BuildResult
Dumps logs and triggers a Ginkgo assertion if the build did NOT have an error (this will not assert on timeouts)
func (*BuildResult) AssertSuccess ¶
func (t *BuildResult) AssertSuccess() *BuildResult
Dumps logs and triggers a Ginkgo assertion if the build did NOT succeed.
func (*BuildResult) DumpLogs ¶
func (t *BuildResult) DumpLogs()
DumpLogs sends logs associated with this BuildResult to the GinkgoWriter.
func (*BuildResult) Logs ¶
func (t *BuildResult) Logs() (string, error)
Logs returns the logs associated with this build.
func (*BuildResult) LogsNoTimestamp ¶
func (t *BuildResult) LogsNoTimestamp() (string, error)
LogsNoTimestamp returns the logs associated with this build.
type ContainerMemoryRSSType ¶
type ContainerMemoryRSSType struct {
Data struct {
Result []struct {
Metric struct {
MetricName string `json:"__name__"`
Container string `json:"container"`
Endpoint string `json:"endpoint"`
ID string `json:"id"`
Image string `json:"image"`
Instance string `json:"instance"`
Job string `json:"job"`
MetricPath string `json:"metrics_path"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Node string `json:"node"`
Pod string `json:"pod"`
Service string `json:"service"`
} `json:"metric"`
Value []interface{} `json:"value"`
} `json:"result"`
ResultType string `json:"resultType"`
} `json:"data"`
Status string `json:"status"`
}
type CoreOSImageArch ¶
type CoreOSImageArch string
func (CoreOSImageArch) String ¶
func (a CoreOSImageArch) String() string
type Credential ¶
type Credential struct {
Type string `json:"type"`
Data struct {
PrismCentral struct {
Username string `json:"username"`
Password string `json:"password"`
} `json:"prismCentral"`
} `json:"data"`
}
Credential is an object representing credentials
type Database ¶
type Database interface {
// PodName returns the name of the Pod this helper is bound to.
PodName() string
// IsReady indicates whether the underlying Pod is ready for queries.
IsReady(oc *exutil.CLI) (bool, error)
// Query queries the database as a regular user.
Query(oc *exutil.CLI, query string) (string, error)
// QueryPrivileged queries the database as a privileged user.
QueryPrivileged(oc *exutil.CLI, query string) (string, error)
// TestRemoteLogin tests whether it is possible to remote login to hostAddress.
TestRemoteLogin(oc *exutil.CLI, hostAddress string) error
}
Database interface allows testing database images.
type ECRClient ¶
type ECRClient struct {
// contains filtered or unexported fields
}
ECRClient struct
func (*ECRClient) CreateContainerRepository ¶
CreateContainerRepository create a container repository
func (*ECRClient) DeleteContainerRepository ¶
DeleteContainerRepository delete container repository
func (*ECRClient) GetAuthorizationToken ¶
GetAuthorizationToken get container repository credential
type Gcloud ¶
type Gcloud struct {
ProjectID string
}
Gcloud struct
func (*Gcloud) AddBGPPeerToRouter ¶
func (*Gcloud) AddInterfaceToRouter ¶
func (*Gcloud) CreateDeploymentManager ¶
func (*Gcloud) CreateExternalVPNGateway ¶
func (*Gcloud) CreateVPNGateway ¶
func (*Gcloud) CreateVPNTunnel ¶
func (*Gcloud) CreateVpnRouter ¶
func (*Gcloud) DeleteDeploymentManager ¶
func (*Gcloud) DeleteExternalVPNGateway ¶
func (*Gcloud) DeleteVPNGateway ¶
func (*Gcloud) DeleteVPNTunnel ¶
func (*Gcloud) DeleteVpnRouter ¶
func (*Gcloud) GetFilestoreInstanceInfo ¶
GetFilestoreInstanceInfo returns filestore instance detailed info from banckend
func (*Gcloud) GetFirewallAllowPorts ¶
GetFirewallAllowPorts returns firewall allow ports
func (*Gcloud) GetGcpInstanceByNode ¶
GetGcpInstanceByNode returns the instance name
func (*Gcloud) GetGcpInstanceStateByNode ¶
GetGcpInstanceStateByNode returns the instance state
func (*Gcloud) GetIntSvcExternalIP ¶
GetIntSvcExternalIP returns the int svc external IP
func (*Gcloud) GetIntSvcInternalIP ¶
GetIntSvcInternalIP returns the int svc internal IP
func (*Gcloud) GetPdVolumeInfo ¶
GetPdVolumeInfo returns pd volume detailed info from backend
func (*Gcloud) GetResourceTags ¶
func (*Gcloud) GetVPNGatewayIP ¶
func (*Gcloud) Login ¶
Login logins to the gcloud. This function needs to be used only once to login into the GCP. the gcloud client is only used for the cluster which is on gcp platform.
func (*Gcloud) StartInstance ¶
StartInstance Bring GCP node/instance back up
func (*Gcloud) StopInstance ¶
StopInstance Shutdown GCP node/instance
func (*Gcloud) StopInstanceAsync ¶
StopInstanceAsync Shutdown GCP node/instance with async
type GitRepo ¶
type GitRepo struct {
RepoPath string
// contains filtered or unexported fields
}
func NewGitRepo ¶
NewGitRepo creates temporary test directories with local and "remote" git repo
func (GitRepo) AddAndCommit ¶
AddAndCommit commits a file with its content to local repo
type HostedClusterPlatformType ¶
type HostedClusterPlatformType = string
const ( // AWSPlatform represents Amazon Web Services infrastructure. AWSPlatform HostedClusterPlatformType = "AWS" // NonePlatform represents user supplied (e.g. bare metal) infrastructure. NonePlatform HostedClusterPlatformType = "None" // IBMCloudPlatform represents IBM Cloud infrastructure. IBMCloudPlatform HostedClusterPlatformType = "IBMCloud" // AgentPlatform represents user supplied insfrastructure booted with agents. AgentPlatform HostedClusterPlatformType = "Agent" // KubevirtPlatform represents Kubevirt infrastructure. KubevirtPlatform HostedClusterPlatformType = "KubeVirt" // AzurePlatform represents Azure infrastructure. AzurePlatform HostedClusterPlatformType = "Azure" // PowerVSPlatform represents PowerVS infrastructure. PowerVSPlatform HostedClusterPlatformType = "PowerVS" )
func GetHostedClusterPlatformType ¶
func GetHostedClusterPlatformType(oc *exutil.CLI, clusterName, clusterNamespace string) (HostedClusterPlatformType, error)
GetHostedClusterPlatformType returns a hosted cluster platform type oc is the management cluster client to query the hosted cluster platform type based on hostedcluster CR obj
type IAMClient ¶
type IAMClient struct {
// contains filtered or unexported fields
}
IAMClient struct for IAM operations
func NewDelegatingIAMClient ¶
NewDelegatingIAMClient creates an IAMClient which delegates calls to methods that are not implemented by itself to the wrapped iam.IAM client.
func NewIAMClient ¶
func NewIAMClient() *IAMClient
NewIAMClient constructor to create IAM client with default credential and config Should use GetAwsCredentialFromCluster(oc) to set ENV first before using it
func NewIAMClientFromCredFile ¶
NewIAMClientFromCredFile constructor to create IAM client with user's credential file
func (*IAMClient) AttachRolePolicy ¶
Attach role policy
func (*IAMClient) CreatePolicy ¶
func (iamClient *IAMClient) CreatePolicy(policyDocument string, policyName string, description string, tagList map[string]string, path string) (string, error)
Create policy
func (*IAMClient) CreateRoleWithContext ¶
func (iamClient *IAMClient) CreateRoleWithContext(ctx aws.Context, input *iam.CreateRoleInput, opts ...request.Option) (*iam.CreateRoleOutput, error)
func (*IAMClient) DeleteOpenIDConnectProviderByProviderName ¶
func (*IAMClient) DeletePolicy ¶
Delete policy
func (*IAMClient) DeleteRoleWithContext ¶
func (iamClient *IAMClient) DeleteRoleWithContext(ctx aws.Context, input *iam.DeleteRoleInput, opts ...request.Option) (*iam.DeleteRoleOutput, error)
func (*IAMClient) DetachRolePolicy ¶
Detach role policy
func (*IAMClient) GetRolePolicy ¶
func (*IAMClient) ListOperatsorRolesByPrefix ¶
func (*IAMClient) UpdateRolePolicy ¶
type IBMPowerVsSession ¶
type IBMPowerVsSession struct {
// contains filtered or unexported fields
}
func LoginIBMPowerVsCloud ¶
func LoginIBMPowerVsCloud(apiKey, zone, userAccount string, cloudId string) (*IBMPowerVsSession, error)
LoginIBMPowerVsCloud authenticates and returns a session for Powervs cloud
type IBMSession ¶
type IBMSession struct {
// contains filtered or unexported fields
}
IBMSession is an object representing an IBM session
func NewIBMSessionFromEnv ¶
func NewIBMSessionFromEnv(ibmApiKey string) (*IBMSession, error)
NewIBMSessionFromEnv creates a new IBM session from environment credentials
type KMSClient ¶
type KMSClient struct {
// contains filtered or unexported fields
}
KMSClient struct.
type LogDumperFunc ¶
type LogDumperFunc func(oc *exutil.CLI, br *BuildResult) (string, error)
type MissingTagError ¶
type MissingTagError struct {
Tags []string
}
func (MissingTagError) Error ¶
func (mte MissingTagError) Error() string
type Monitor ¶
type Monitor struct {
Token string
// contains filtered or unexported fields
}
Monitor define a monitor object. It will query thanos
func NewMonitor ¶
NewMonitor create a monitor using thanos URL
func (*Monitor) GetAlertRules ¶
GetAlertRules returns all alerting rules
func (*Monitor) GetAlerts ¶
GetAlerts returns all alerts. It doesn't use the alermanager, and it returns alerts in 'pending' state too
func (*Monitor) GetAllRules ¶
GetAllRules returns all rules
func (*Monitor) GetRecordRules ¶
GetRecordRules returns all recording rules
func (*Monitor) InstantQuery ¶
func (mo *Monitor) InstantQuery(queryParams MonitorInstantQueryParams) (string, error)
InstantQuery query executes a query in prometheus with time and timeout.
Example: curl 'http://host:port/api/v1/query?query=up&time=2015-07-01T20:10:51.781Z'
func (*Monitor) InstantQueryWithRetry ¶
func (mo *Monitor) InstantQueryWithRetry(queryParams MonitorInstantQueryParams, timeDurationSec int) string
InstantQueryWithRetry passes QueryParams to InstantQuery and polls it until it succeeds or times out.
func (*Monitor) RangeQuery ¶
func (mo *Monitor) RangeQuery(queryParams MonitorRangeQueryParams) (string, error)
RangeQuery executes a query range in prometheus with start, end, step and timeout
Example: curl 'http://host:port/api/v1/query_range?query=metricname&start=2015-07-01T20:10:30.781Z&end=2015-07-01T20:11:00.781Z&step=15s'
type MonitorInstantQueryParams ¶
MonitorInstantQueryParams API doc query parameters:
query=<string>: Prometheus expression query string. time=<rfc3339 | unix_timestamp>: Evaluation timestamp. Optional. timeout=<duration>: Evaluation timeout. Optional. Defaults to and is capped by the value of the -query.timeout flag.
type MonitorRangeQueryParams ¶
type MonitorRangeQueryParams struct {
Query string
Start string
End string
Step string
Timeout string
}
MonitorRangeQueryParams API doc query range parameters
query=<string>: Prometheus expression query string. start=<rfc3339 | unix_timestamp>: Start timestamp, inclusive. end=<rfc3339 | unix_timestamp>: End timestamp, inclusive. step=<duration | float>: Query resolution step width in duration format or float number of seconds. timeout=<duration>: Evaluation timeout. Optional. Defaults to and is capped by the value of the -query.timeout flag.
type Monitorer ¶
type Monitorer interface {
SimpleQuery(query string) (string, error)
InstantQuery(queryParams MonitorInstantQueryParams) (string, error)
RangeQuery(queryParams MonitorRangeQueryParams) (string, error)
GetAllRules() (string, error)
GetAlertRules() (string, error)
GetRecordRules() (string, error)
// contains filtered or unexported methods
}
Monitorer interface represents all funcs of monitoring
type NodeResources ¶
NodeResources contains the resources of CPU and Memory in a node
type NutanixClient ¶
type NutanixClient struct {
// contains filtered or unexported fields
}
func InitNutanixClient ¶
func InitNutanixClient(oc *exutil.CLI) (*NutanixClient, error)
Initial nutanix client by configuring coresponding parameters
func (*NutanixClient) ChangeNutanixVMState ¶
func (nt *NutanixClient) ChangeNutanixVMState(vmUUID string, targeState string) error
Change NutanixVMstate, target state should be "ON" or "OFF"
func (*NutanixClient) GetNutanixVMState ¶
func (nt *NutanixClient) GetNutanixVMState(vmUUID string) (string, error)
Get Nutanix VM state, general value would be "ON" or "OFF"
func (*NutanixClient) GetNutanixVMUUID ¶
func (nt *NutanixClient) GetNutanixVMUUID(nodeName string) (string, error)
Get Nutanix VM UUID
type NutanixSession ¶
type NutanixSession struct {
Username string
Password string
Endpoint string
// contains filtered or unexported fields
}
NutanixSession is an object representing an nutanix session
func NewNutanixSession ¶
func NewNutanixSession(username, password, endpoint string) (*NutanixSession, error)
NewNutanixSession creates a new nutanix session from environment credentials
func (*NutanixSession) GetNutanixInstanceID ¶
func (nutanixSess *NutanixSession) GetNutanixInstanceID(instanceName string) (string, error)
GetNutanixInstanceID get nutanix instance id
func (*NutanixSession) GetNutanixInstanceState ¶
func (nutanixSess *NutanixSession) GetNutanixInstanceState(instanceID string) (string, error)
GetNutanixInstanceState get nutanix powerstate for e.g. ON or OFF
func (*NutanixSession) SetNutanixInstanceState ¶
func (nutanixSess *NutanixSession) SetNutanixInstanceState(targetState string, instanceUUID string) error
SetNutanixInstanceState changes the Nutanix power state, e.g., ON or OFF
type OpenstackCredentials ¶
type OpenstackCredentials struct {
Clouds struct {
Openstack struct {
Auth struct {
AuthURL string `yaml:"auth_url"`
Password string `yaml:"password"`
ProjectID string `yaml:"project_id"`
ProjectName string `yaml:"project_name"`
UserDomainName string `yaml:"user_domain_name"`
Username string `yaml:"username"`
ApplicationCredentialID string `yaml:"application_credential_id"`
ApplicationCredentialSecret string `yaml:"application_credential_secret"`
} `yaml:"auth"`
EndpointType string `yaml:"endpoint_type"`
IdentityAPIVersion string `yaml:"identity_api_version"`
RegionName string `yaml:"region_name"`
Verify bool `yaml:"verify"`
} `yaml:"openstack"`
} `yaml:"clouds"`
}
OpenstackCredentials the openstack credentials extracted from cluster
func GetOpenStackCredentials ¶
func GetOpenStackCredentials(oc *exutil.CLI) (*OpenstackCredentials, error)
GetOpenStackCredentials gets credentials from cluster
type Osp ¶
type Osp struct {
// contains filtered or unexported fields
}
A Osp represents object ...
func (*Osp) GetOspInstance ¶
func (osp *Osp) GetOspInstance(client *gophercloud.ServiceClient, instanceName string) (string, error)
GetOspInstance represents to list osp instance using SDK
func (*Osp) GetOspInstanceState ¶
func (osp *Osp) GetOspInstanceState(client *gophercloud.ServiceClient, instanceName string) (string, error)
GetOspInstanceState represents to list osp instance state using SDK
func (*Osp) GetStartOspInstance ¶
func (osp *Osp) GetStartOspInstance(client *gophercloud.ServiceClient, instanceName string) error
GetStartOspInstance represents to start osp instance using SDK
func (*Osp) GetStopOspInstance ¶
func (osp *Osp) GetStopOspInstance(client *gophercloud.ServiceClient, instanceName string) error
GetStopOspInstance represents to stop osp instance using SDK
type Pod ¶
Pod Parameters can be used to set the template parameters except PodName as PodName can be provided using pod.Name
type PrometheusMonitor ¶
type PrometheusMonitor struct {
Monitor
}
PrometheusMonitor define a monitor object. It will query prometheus directly instead of thanos
func NewPrometheusMonitor ¶
func NewPrometheusMonitor(oc *exutil.CLI) (*PrometheusMonitor, error)
NewPrometheusMonitor create a monitor using prometheus url
type RDU2Host ¶
type RDU2Host struct {
Name string `yaml:"name"`
BmcAddress string `yaml:"bmc_address"`
BmcUser string `yaml:"bmc_user"`
BmcPassword string `yaml:"bmc_pass"`
BmcForwardedPort uint16 `yaml:"bmc_forwarded_port"`
Host string `yaml:"host"`
JumpHost string `yaml:"-"`
MacAddress string `yaml:"mac"`
RedfishScheme string `yaml:"redfish_scheme"`
RedfishBaseURI string `yaml:"redfish_base_uri"`
}
RDU2Host models the RDU2 host (partial representation)
func (*RDU2Host) GetMachinePowerStatus ¶
GetMachinePowerStatus returns the power status of the BM Machine
func (*RDU2Host) StartUPIbaremetalInstance ¶
StartUPIbaremetalInstance power on the BM machine
func (*RDU2Host) StopUPIbaremetalInstance ¶
StopUPIbaremetalInstance power off the BM machine
type RDU2Hosts ¶
type RDU2Hosts struct {
// contains filtered or unexported fields
}
RDU2Hosts holds the collection of RDU2 hosts and provides methods to manage them
type ReplicaSet ¶
type ReplicaSet interface {
// QueryPrimary queries the database on primary node as a regular user.
QueryPrimary(oc *exutil.CLI, query string) (string, error)
}
ReplicaSet interface allows to interact with database on multiple nodes.
type Route53Client ¶
Route53Client extends the route53.Route53 client without overriding its existing methods.
func NewRoute53Client ¶
func NewRoute53Client() *Route53Client
NewRoute53Client creates a new Route53Client. It is expected to be called after GetAwsCredentialFromCluster which sets AWS-specific environment variables.
func (*Route53Client) DeleteHostedZoneWithContextAndCheck ¶
func (route53Client *Route53Client) DeleteHostedZoneWithContextAndCheck(ctx context.Context, input *route53.DeleteHostedZoneInput, opts ...request.Option) (*route53.DeleteHostedZoneOutput, error)
DeleteHostedZoneWithContextAndCheck deletes a hosted zone (delegate to the wrapped route53.Route53 client), then wait for the deletion to take effect.
func (*Route53Client) EmptyHostedZoneWithContext ¶
func (route53Client *Route53Client) EmptyHostedZoneWithContext(ctx context.Context, hostedZoneId string) (*route53.ChangeResourceRecordSetsOutput, error)
EmptyHostedZoneWithContext removes all except NS/SOA records in a hosted zone, then wait until the changes to take effect.
type S3Client ¶
type S3Client struct {
// contains filtered or unexported fields
}
S3Client struct for S3 storage operations
func NewDelegatingS3Client ¶
NewDelegatingS3Client creates an S3Client which delegates calls to methods that are not implemented by itself to the wrapped s3.S3 client.
func NewS3Client ¶
func NewS3Client() *S3Client
NewS3Client constructor to create S3 client with default credential and config
func NewS3ClientFromCredFile ¶
NewS3ClientFromCredFile constrctor to create S3 client with user's credential file and region param: filename crednetial file path param: profile config profile e.g. [default] param: region
func (*S3Client) CreateBucket ¶
CreateBucket create S3 bucket param: bucket name from user input
func (*S3Client) DeleteBucket ¶
DeleteBucket delete S3 bucket param: name bucket name from user input
func (*S3Client) EmptyBucketWithContextAndCheck ¶
EmptyBucketWithContextAndCheck empties a bucket, then wait for the deletions to take effect.
func (*S3Client) HeadBucket ¶
HeadBucket util func to check whether bucket exists or not param: name bucket name
func (*S3Client) IsBucketEmptyWithContext ¶
func (*S3Client) PutBucketPolicy ¶
PutBucketPolicy configures a given bucket with a policy param: name bucket name param: policy policy that will be added the bucket
func (*S3Client) WaitForBucketEmptinessWithContext ¶
func (sc *S3Client) WaitForBucketEmptinessWithContext(ctx context.Context, bucketName string, bucketEmptiness BucketEmptiness, interval, timeout time.Duration) error
WaitForBucketEmptinessWithContext waits for the expected bucket emptiness (i.e. empty/non-empty) to be fulfilled.
type Secret ¶
type Secret struct {
Data struct {
Credentials string `json:"credentials"`
} `json:"data"`
}
Secret is an object representing secrets
type SecureMatcher ¶
type SecureMatcher struct {
// contains filtered or unexported fields
}
SecureMatcher it will not print the compared values when the matcher fails
func (*SecureMatcher) FailureMessage ¶
func (matcher *SecureMatcher) FailureMessage(actual interface{}) (message string)
FailureMessage returns the message in case of successful match
func (*SecureMatcher) Match ¶
func (matcher *SecureMatcher) Match(actual interface{}) (success bool, err error)
Match checks it the condition with the given type has the right value in the given field.
func (*SecureMatcher) NegatedFailureMessage ¶
func (matcher *SecureMatcher) NegatedFailureMessage(actual interface{}) (message string)
NegatedFailureMessage returns the message in case of failed match
type StringPairs ¶
The string pairs to update in a file
type StsClient ¶
StsClient extends the sts.STS client without overriding its existing methods.
func NewDelegatingStsClient ¶
NewDelegatingStsClient creates an StsClient which delegates calls to methods that are not implemented by itself to the wrapped sts.STS client.
type SynchronizedBuffer ¶
type SynchronizedBuffer struct {
// contains filtered or unexported fields
}
SynchronizedBuffer wraps bytes.Buffer with a sync.Mutex for thread-safety.
func NewSynchronizedBuffer ¶
func NewSynchronizedBuffer() *SynchronizedBuffer
NewSynchronizedBuffer initializes an empty SynchronizedBuffer which is ready to use
func (*SynchronizedBuffer) String ¶
func (sb *SynchronizedBuffer) String() string
type TerraformExec ¶
type TerraformExec struct {
// contains filtered or unexported fields
}
TerraformExec structure which stores all atributes about the Terraform installation and templates location.
func NewTerraform ¶
func NewTerraform(workingDir string) (*TerraformExec, error)
NewTerraform function takes care of finding out the terraform binary to use or setting up and installing Terraform (if not already installed) in the system so that it can be used during the execution of the tfexec.Terraform struct. Inputs:
- workingDir: Directory where the Terraform scripts are located
Returns:
- A TerraformExec struct which can be used to invoke other Terraform methods.
func (*TerraformExec) TerraformApply ¶
func (tf *TerraformExec) TerraformApply(vars ...string) error
TerraformApply executes terraform apply in the workingDir templates Inputs:
- vars: []string including all the vars to be passed during the terraform apply execution. Format: ["host=master.ocp", "num_workers=3"]
func (*TerraformExec) TerraformDestroy ¶
func (tf *TerraformExec) TerraformDestroy(vars ...string) error
TerraformDestroy runs terraform destroy in the workingDir templates directory. Inputs:
- vars: []string A list of the vars passed to the terraform destroy commmand. In a similar way as in TerraformApply. Format: ["host=master.ocp", "num_workers=3"]
func (*TerraformExec) TerraformInit ¶
func (tf *TerraformExec) TerraformInit() error
TerraformInit executes terraform init in the workingDir templates
func (*TerraformExec) TerraformInitWithUpgrade ¶
func (tf *TerraformExec) TerraformInitWithUpgrade() error
TerraformInitWithUpgrade executes terraform init --upgrade in the workingDir templates
func (*TerraformExec) TerraformOutput ¶
func (tf *TerraformExec) TerraformOutput() (map[string]string, error)
TerraformOutput executes terraform show command and returns a map of the output values Returns:
- Map of key:string and value:string including the output var name and the corresponding value. For more information on output values check: https://www.terraform.io/language/values/outputs Example: { 'instance_ip': '10.0.176.10', 'instance_dns': 'cool.worker.internal.aws.com' }
func (*TerraformExec) TerraformShow ¶
func (tf *TerraformExec) TerraformShow() (*tfjson.State, error)
TerraformShow executes the terraform show command Returns:
- The Terraform state in a tfjson.State struct type
- Any error which could occur
type TestEnv ¶
type TestEnv struct {
Type TestEnvType
ArtifactDir string
PullSecretLocation string
}
func GetTestEnv ¶
func GetTestEnv() *TestEnv
GetTestEnv gets a initialized *TestEnv in a thread-safe and lazy manner
func (*TestEnv) IsRunningInJenkins ¶
func (*TestEnv) IsRunningInProw ¶
func (*TestEnv) IsRunningLocally ¶
type TestEnvType ¶
type TestEnvType int
type Vmware ¶
type Vmware struct {
GovmomiURL string
}
Vmware is object
func (*Vmware) GetVsphereConnectionLogout ¶
GetVsphereConnectionLogout get connection logout
func (*Vmware) GetVspheresInstance ¶
GetVspheresInstance represents to get vmware instance.
func (*Vmware) GetVspheresInstanceState ¶
func (vmware *Vmware) GetVspheresInstanceState(c *govmomi.Client, vmInstance string) (string, error)
GetVspheresInstanceState represents get instance state.
func (*Vmware) StartVsphereInstance ¶
StartVsphereInstance represents starting instance ...
type YamlReplace ¶
type YamlReplace struct {
Path string // path to modify or create value
Value string // a string literal or YAML string (ex. 'name: frontend') to be set under the given path
}
YamlReplace define a YAML modification given. Example:
YamlReplace {
Path: 'spec.template.spec.imagePullSecrets',
Value: '- name: notmatch-secret',
}
Source Files
¶
- assert.go
- auth_rule_resolver.go
- aws_client.go
- azure_client.go
- azure_client_v2.go
- azure_creds.go
- ccoctl.go
- client.go
- clusters.go
- db_image_helpers.go
- deployment.go
- deploymentconfigs.go
- docker.go
- endpoints.go
- file.go
- framework.go
- gcloud_client.go
- gomega_helpers.go
- gwrapper.go
- hypeshift_cluster.go
- ibmcloud_client.go
- image_helpers.go
- ldap.go
- machine_helpers.go
- manifest.go
- metrics.go
- must-gather.go
- networking.go
- nfs.go
- nodes.go
- nutanix_client.go
- nutanix_restapi.go
- oc_copy.go
- openstack_util.go
- pods.go
- prometheus_monitoring.go
- psap.go
- randstr.go
- release.go
- resource_op.go
- rosa.go
- router.go
- sar.go
- service_account.go
- ssh_client.go
- statefulsets.go
- synchronized_buffer.go
- template.go
- terraform.go
- test.go
- test_env.go
- upibaremetalrdu_client.go
- vmware_client.go
- volumes.go
- yaml.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package version supplies version information collected at build time to OpenShift and Kubernetes components.
|
Package version supplies version information collected at build time to OpenShift and Kubernetes components. |