Documentation ¶
Index ¶
- Variables
- func ConvertFilterToString(qs interface{}) (filter string)
- func ConvertToMap(qs interface{}) map[string]interface{}
- func ConvertToStringArray(interfaceList []interface{}) []string
- func ConvertToStringMap(interfaceMap map[string]interface{}) map[string]string
- func CreateRHCSClusterByProfile(token string, profile *Profile) (string, error)
- func DestroyRHCSClusterResourcesByProfile(token string, profile *Profile) error
- func ElementInArray(target string, str_array []string) bool
- func GenerateClusterCreationArgsByProfile(token string, profile *Profile) (clusterArgs *exec.ClusterArgs, err error)
- func GetElements(content map[string]interface{}, element string, num ...int) interface{}
- func GetMajorVersion(rawVersion string) string
- func GetYAMLProfilesDir() string
- func PrepareAccountRoles(token string, accountRolePrefix string, accountRolesPath string, ...) (*exec.AccountRolesOutput, error)
- func PrepareAdditionalSecurityGroups(region string, vpcID string, sgNumbers int) ([]string, error)
- func PrepareKMSKey(manifestDir string, profile *Profile, kmsName string, accountRolePrefix string, ...) (string, error)
- func PrepareOIDCProviderAndOperatorRoles(token string, oidcConfigType string, operatorRolePrefix string, ...) (*exec.OIDCProviderOperatorRolesOutput, error)
- func PrepareProxy(region string, VPCID string, subnetPublicID string, keyPairID string) (*exec.ProxyOutput, error)
- func PrepareRHCSClusterByProfileENV() (string, error)
- func PrepareRoute53() (string, error)
- func PrepareSharedVpcPolicyAndHostedZone(region string, sharedVpcAWSSharedCredentialsFile string, clusterName string, ...) (*exec.SharedVpcPolicyAndHostedZoneOutput, error)
- func PrepareVPC(region string, multiZone bool, azIDs []string, ...) (*exec.VPCOutput, error)
- func PrepareVersion(connection *client.Connection, versionTag string, channelGroup string, ...) string
- func TrimName(name string) string
- func TrimVersion(version string, groupChannel string) string
- type Profile
- type Response
Constants ¶
This section is empty.
Variables ¶
var Critical = Label("Critical")
importance
var Day1 = Label("day1")
day1/day1-post and day2
var Day1Negative = Label("day1-negative")
var Day1Post = Label("day1-post")
var Day1Prepare = Label("day1-prepare")
var Day1Supplemental = Label("day1-supplemental")
var Day2 = Label("day2")
var Day3 = Label("day3")
day3 : the test cases will destroy default resource
var Destroy = Label("destroy")
destroy
var Exclude = Label("Exclude")
exclude
var FeatureClusterAutoscaler = Label("feature-cluster-autoscaler")
Features
var FeatureClusterCompute = Label("feature-cluster-compute")
var FeatureClusterDefault = Label("feature-cluster-default")
var FeatureClusterEncryption = Label("feature-cluster-encryption")
var FeatureClusterIMDSv2 = Label("feature-cluster-imdsv2")
var FeatureClusterMisc = Label("feature-cluster-misc")
var FeatureClusterNetwork = Label("feature-cluster-network")
var FeatureClusterPrivate = Label("feature-cluster-private")
var FeatureClusterProxy = Label("feature-cluster-proxy")
var FeatureIDP = Label("feature-idp")
var FeatureImport = Label("feature-import")
var FeatureIngress = Label("feature-ingress")
var FeatureMachinepool = Label("feature-machinepool")
var FeatureTuningConfig = Label("feature-tuning-config")
var High = Label("High")
var Low = Label("Low")
var Medium = Label("Medium")
var (
RHCSConnection = createConnectionWithToken(RHCSOCMToken)
)
Regular users in the organization 'Red Hat-Service Delivery-tester'
var (
RHCSOCMToken = os.Getenv(CON.TokenENVName)
)
var Upgrade = Label("upgrade")
Functions ¶
func ConvertFilterToString ¶ added in v1.4.0
func ConvertFilterToString(qs interface{}) (filter string)
ConvertFilterToString will Convert a fileter struct to a string if "like" in the value will be keeped if no 'like' in value, the string will contains key=value if map in value the substring will be key.subkey='subvalue'
func ConvertToMap ¶ added in v1.4.0
func ConvertToMap(qs interface{}) map[string]interface{}
func ConvertToStringArray ¶ added in v1.4.0
func ConvertToStringArray(interfaceList []interface{}) []string
ConvertToStringArray will convert the []interface to []string
func ConvertToStringMap ¶ added in v1.4.0
ConvertToStringMap will convert the []interface to []string
func DestroyRHCSClusterResourcesByProfile ¶ added in v1.6.3
func ElementInArray ¶ added in v1.4.0
check if one element is in the array. if yes, return true; or return false
func GenerateClusterCreationArgsByProfile ¶
func GenerateClusterCreationArgsByProfile(token string, profile *Profile) (clusterArgs *exec.ClusterArgs, err error)
func GetElements ¶ added in v1.4.0
GetElements will return an array or a string get from the items based on the num If num 0 and itemkey id passed it will return the itemkey value with index 0
func GetMajorVersion ¶ added in v1.5.1
func GetYAMLProfilesDir ¶ added in v1.6.0
func GetYAMLProfilesDir() string
func PrepareAccountRoles ¶
func PrepareAdditionalSecurityGroups ¶ added in v1.5.0
func PrepareKMSKey ¶
func PrepareOIDCProviderAndOperatorRoles ¶ added in v1.4.0
func PrepareProxy ¶
func PrepareRHCSClusterByProfileENV ¶ added in v1.4.0
PrepareRHCSClusterByProfileENV will be used for all day2 tests. Do not need to create a cluster, it needs an existing cluster Two ways:
- If you created a cluster by other way, you can Export CLUSTER_ID=<cluster id>
- If you are using this CI created the cluster, just need to Export CLUSTER_PROFILE=<profile name>
func PrepareRoute53 ¶
func PrepareSharedVpcPolicyAndHostedZone ¶ added in v1.6.0
func PrepareSharedVpcPolicyAndHostedZone(region string, sharedVpcAWSSharedCredentialsFile string, clusterName string, dnsDomainID string, ingressOperatorRoleArn string, installerRoleArn string, clusterAwsAccount string, vpcID string, subnets []string, domainPrefix string) (*exec.SharedVpcPolicyAndHostedZoneOutput, error)
func PrepareVPC ¶
func PrepareVersion ¶ added in v1.4.0
func PrepareVersion(connection *client.Connection, versionTag string, channelGroup string, profile *Profile) string
PrepareVersion supports below types version with a openshift version like 4.13.12 version with latest verion with x-1, it means the version will choose one with x-1 version which can be used for x stream upgrade version with y-1, it means the version will choose one with y-1 version which can be used for y stream upgrade
func TrimVersion ¶ added in v1.4.0
Types ¶
type Profile ¶
type Profile struct { Name string `ini:"name,omitempty" json:"name,omitempty"` ClusterName string `ini:"cluster_name,omitempty" json:"cluster_name,omitempty"` DomainPrefix string `ini:"domain_prefix,omitempty" json:"domain_prefix,omitempty"` ClusterType string `ini:"cluster_type,omitempty" json:"cluster_type,omitempty"` ProductID string `ini:"product_id,omitempty" json:"product_id,omitempty"` MajorVersion string `ini:"major_version,omitempty" json:"major_version,omitempty"` Version string `ini:"version,omitempty" json:"version,omitempty"` //Specific OCP version to be specified VersionPattern string `ini:"version_pattern,omitempty" json:"version_pattern,omitempty"` //Version supports indicated version started with openshift-v or major-1 (y-1) or minor-1 (z-1) ChannelGroup string `ini:"channel_group,omitempty" json:"channel_group,omitempty"` CloudProvider string `ini:"cloud_provider,omitempty" json:"cloud_provider,omitempty"` Region string `ini:"region,omitempty" json:"region,omitempty"` InstanceType string `ini:"instance_type,omitempty" json:"instance_type,omitempty"` Zones string `ini:"zones,omitempty" json:"zones,omitempty"` // zones should be like a,b,c,d StorageLB bool `ini:"storage_lb,omitempty" json:"storage_lb,omitempty"` // the unit is GIB, don't support unit set Tagging bool `ini:"tagging,omitempty" json:"tagging,omitempty"` Labeling bool `ini:"labeling,omitempty" json:"labeling,omitempty"` Etcd bool `ini:"etcd_encryption,omitempty" json:"etcd_encryption,omitempty"` FIPS bool `ini:"fips,omitempty" json:"fips,omitempty"` CCS bool `ini:"ccs,omitempty" json:"ccs,omitempty"` STS bool `ini:"sts,omitempty" json:"sts,omitempty"` Autoscale bool `ini:"autoscaling_enabled,omitempty" json:"autoscaling_enabled,omitempty"` MultiAZ bool `ini:"multi_az,omitempty" json:"multi_az,omitempty"` BYOVPC bool `ini:"byovpc,omitempty" json:"byovpc,omitempty"` PrivateLink bool `ini:"private_link,omitempty" json:"private_link,omitempty"` Private bool `ini:"private,omitempty" json:"private,omitempty"` BYOK bool `ini:"byok,omitempty" json:"byok,omitempty"` KMSKey bool `ini:"kms_key_arn,omitempty" json:"kms_key_arn,omitempty"` DifferentEncryptionKeys bool `ini:"different_encryption_keys,omitempty" json:"different_encryption_keys,omitempty"` NetWorkingSet bool `ini:"networking_set,omitempty" json:"networking_set,omitempty"` Proxy bool `ini:"proxy,omitempty" json:"proxy,omitempty"` OIDCConfig string `ini:"oidc_config,omitempty" json:"oidc_config,omitempty"` ProvisionShard string `ini:"provisionShard,omitempty" json:"provisionShard,omitempty"` Ec2MetadataHttpTokens string `ini:"ec2_metadata_http_tokens,omitempty" json:"ec2_metadata_http_tokens,omitempty"` ComputeReplicas int `ini:"compute_replicas,omitempty" json:"compute_replicas,omitempty"` ComputeMachineType string `ini:"compute_machine_type,omitempty" json:"compute_machine_type,omitempty"` AuditLogForward bool `ini:"auditlog_forward,omitempty" json:"auditlog_forward,omitempty"` AdminEnabled bool `ini:"admin_enabled,omitempty" json:"admin_enabled,omitempty"` ManagedPolicies bool `ini:"managed_policies,omitempty" json:"managed_policies,omitempty"` WorkerDiskSize int `ini:"worker_disk_size,omitempty" json:"worker_disk_size,omitempty"` AdditionalSGNumber int `ini:"additional_sg_number,omitempty" json:"additional_sg_number,omitempty"` UnifiedAccRolesPath string `ini:"unified_acc_role_path,omitempty" json:"unified_acc_role_path,omitempty"` MachineCIDR string `ini:"machine_cidr,omitempty" json:"machine_cidr,omitempty"` ServiceCIDR string `ini:"service_cidr,omitempty" json:"service_cidr,omitempty"` PodCIDR string `ini:"pod_cidr,omitempty" json:"pod_cidr,omitempty"` HostPrefix int `ini:"host_prefix,omitempty" json:"host_prefix,omitempty"` FullResources bool `ini:"full_resources,omitempty" json:"full_resources,omitempty"` DontWaitForCluster bool `ini:"no_wait_cluster,omitempty" json:"no_wait_cluster,omitempty"` }
Profile Provides profile struct for cluster creation be matrix
func GetRandomProfile ¶ added in v1.6.3
func GetRandomProfile(clusterTypes ...constants.ClusterType) (profile *Profile, err error)
func LoadProfileYamlFile ¶ added in v1.4.0
func LoadProfileYamlFileByENV ¶ added in v1.4.0
func LoadProfileYamlFileByENV() *Profile
func (*Profile) GetClusterManifestsDir ¶ added in v1.6.0
func (*Profile) GetClusterType ¶ added in v1.6.0
func (profile *Profile) GetClusterType() constants.ClusterType