helpers

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountUsername  = "rhn-support-tiwillia"
	DefaultAWSRegion = "us-east-1"

	// Cluster Auhtorization
	M5XLargeResource           = "m5.xlarge"
	AWSComputeNodeResourceType = "compute.node.aws"
	DefaultClusterCount        = 4
	StandardBillingModel       = "standard"
	OsdProductID               = "osd"
	AWSCloudProvider           = "aws"
	ClusterAuthAccountUsername = "rh-perfscale"
	ClusterAuthManaged         = true
	ClusterAuthReserve         = true
	ClusterAuthBYOC            = true
	SingleAvailabilityZone     = "single"
)
View Source
const (
	ClustersEndpoint = "/api/clusters_mgmt/v1/clusters/"
)

Variables

This section is empty.

Functions

func BuildConnection

func BuildConnection(gateway, clientID, clientSecret, token string, logger logging.Logger, ctx context.Context) (*sdk.Connection, error)

BuildConnection build the vegeta connection that is going to be used for testing

func Cleanup

func Cleanup(connection *sdk.Connection)

func CreateCluster

func CreateCluster(body string, gatewayConnection *sdk.Connection) (string, map[string]interface{}, error)

func CreateFile

func CreateFile(name, path string) (*os.File, error)

CreateFile creates the file with the given name

func CreateFolder

func CreateFolder(path string, logger logging.Logger) error

CreateFolder creates folder in the system

func DeleteCluster

func DeleteCluster(id string, deprovision bool, connection *sdk.Connection)

func Parse

func Parse(data []byte) (map[string]interface{}, error)

Parse parses the given JSON data and returns a map of strings containing the result.

func ParseRate

func ParseRate(rate string) (vegeta.Rate, error)

ParseRate addapted `rateFlag` from tsenart/vegeta since the `rateFlag` is not exported it is not possible to reuse the same method, but to match and correctly generate the rate we decided to use the same function. https://github.com/tsenart/vegeta/blob/d73edf2bc2663d83848da2a97a8401a7ed1440bc/flags.go#L68

Types

type CleanClustersTransport

type CleanClustersTransport struct {
	Wrapped http.RoundTripper
	Logger  logging.Logger
	Context context.Context
}

func (*CleanClustersTransport) RoundTrip

func (t *CleanClustersTransport) RoundTrip(request *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL