Documentation ¶
Index ¶
- func AppendToStringSliceIfNotExist(slice []string, value string) []string
- func AssertWaitPollNoErr(e error, msg string)
- func AssertWaitPollWithErr(e error, msg string)
- func CreateFileWithContent(fileAbsPath string, content interface{}) (string, error)
- func CreatePEMCertificate() (string, error)
- func CreateTempFileWithContent(fileContent string) (string, error)
- func CreateTempFileWithPrefixAndContent(prefix string, fileContent string) (string, error)
- func CreateTempOCMConfig() (string, error)
- func ExtractAWSCmdsForClusterCreation(bf bytes.Buffer) []string
- func ExtractCommandsFromOIDCRegister(bf bytes.Buffer) []string
- func ExtractCommandsToCreateAWSResoueces(bf bytes.Buffer) []string
- func ExtractCommandsToDeleteAWSResoueces(bf bytes.Buffer) []string
- func ExtractCommandsToDeleteAccountRoles(bf bytes.Buffer) []string
- func ExtractOIDCProviderARN(output string) string
- func ExtractOIDCProviderFromOidcUrl(urlString string) (string, error)
- func ExtractOIDCProviderIDFromARN(arn string) string
- func GenerateHtpasswdPair(user string, pass string) (string, string, string, error)
- func GenerateMultipleHtpasswdPairs(pairNum int) ([]string, error)
- func GenerateRandomName(prefix string, n int) string
- func GenerateRandomString(length int) string
- func GenerateRandomStringWithSymbols(length int) string
- func GetConsoleUrlBasedOnEnv(ocmApi string) string
- func ParseCommaSeparatedStrings(input string) (output []string)
- func ParseCommandToArgs(command string) []string
- func ParseIssuerURLFromCommand(command string) string
- func ParseLabels(labels string) []string
- func ParseRoleARN(arn string) (string, string, error)
- func ParseSecretArnFromOutput(output string) string
- func ParseTagsFronJsonOutput(tags string) map[string]interface{}
- func ParseTaints(taints string) []string
- func ParseTuningConfigs(tuningConfigs string) []string
- func ParseVersion(version string) (major, minor, optional int, err error)
- func RandomInt(max int) int
- func ReadENVWithDefaultValue(envName string, fallback string) string
- func ReadFileContent(fileAbsPath string) (string, error)
- func RemoveFromStringSlice(slice []string, value string) []string
- func ReplaceCommaSpaceWithComma(sourceValue string) string
- func ReplaceCommaWithCommaSpace(sourceValue string) string
- func SliceContains(slice []string, value string) bool
- func SplitARNResources(v string) []string
- func SplitMajorVersion(openshiftVersion string) string
- func TrimNameByLength(name string, length int) string
- func UniqueStringValues(slice []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertWaitPollNoErr ¶
func AssertWaitPollWithErr ¶
func CreateFileWithContent ¶
Write string to a file
func CreatePEMCertificate ¶
Create a PEM Certificate Code taken from https://shaneutt.com/blog/golang-ca-and-signed-cert-go/
func CreateTempOCMConfig ¶
func ExtractAWSCmdsForClusterCreation ¶
Extract aws commands to create AWS resource promted by rosacli, this function supports to parse bellow commands `rosa create cluster --mode manual --sts /--hosted-cp`
func ExtractCommandsToCreateAWSResoueces ¶
Extract aws commands to create AWS resource promted by rosacli, this function supports to parse bellow commands `rosa create account-role --mode manual` `rosa create operator-roles --mode manual` `rosa create oidc-provider --mode manual`
func ExtractCommandsToDeleteAWSResoueces ¶
Extract aws commands to delete AWS resource promted by rosacli, this function supports to parse bellow commands `rosa delete operator-roles --mode manual` `rosa delete oidc-provider --mode manual`
func ExtractCommandsToDeleteAccountRoles ¶
Extract aws command to delete account roles in manual mode
func ExtractOIDCProviderARN ¶
Extract the oidc provider ARN from the output of `rosa create oidc-config --mode auto` and also for common message containing the arn
func ExtractOIDCProviderFromOidcUrl ¶
Extract oidc provider from the 'OIDC Endpoint URL' field of `rosa describe cluster`
func ExtractOIDCProviderIDFromARN ¶
Extract the oidc provider ARN from the output of `rosa create oidc-config --mode auto` and also for common message containing the arn
func GenerateHtpasswdPair ¶
Generate htpasspwd key value pair, return with a string
func GenerateMultipleHtpasswdPairs ¶
generate Htpasswd user-password Pairs
func GenerateRandomName ¶
func GetConsoleUrlBasedOnEnv ¶
func ParseCommandToArgs ¶
Parse command string to args array. NOTE:If the flag value contains spaces, put the whole value into the array
func ParseLabels ¶
func ParseRoleARN ¶
Function to parse the ARN of a role, return rolePath,roleName and err
func ParseTagsFronJsonOutput ¶
func ParseTaints ¶
func ParseTuningConfigs ¶
func ParseVersion ¶
Extract the major, minor,optional parts from the version strings Major.Minor.Optional-<suffix>,
func ReadENVWithDefaultValue ¶
func ReadFileContent ¶
Read file content to a string
func RemoveFromStringSlice ¶
func SliceContains ¶
func SplitMajorVersion ¶
func TrimNameByLength ¶
func UniqueStringValues ¶
Types ¶
This section is empty.