Documentation ¶
Index ¶
- func CompareQueueMap(a map[string]interface{}, b map[string]interface{}) (bool, error)
- func CreateLogFile(filename string, data []byte) error
- func CreateReportDirectory() (string, error)
- func GetAbsPath(p string) (string, error)
- func GetFileContents(filename string) ([]byte, error)
- func GetSubQueues(q map[string]interface{}) ([]map[string]interface{}, error)
- func GetTestName() string
- func GetUUID() string
- func InitSleepPod(conf SleepPodConfig) *v1.Pod
- func InitTestPod(conf TestPodConfig) *v1.Pod
- func RandSeq(n int) string
- func ReportDirectoryPath() string
- func SliceExists(slice interface{}, item interface{}) (bool, error)
- func Y2Map(yamlPath string) (map[interface{}]interface{}, error)
- func Yaml2Obj(yamlPath string) (runtime.Object, error)
- type LimitsConfigType
- type PartitionConfigType
- type PartitionsWrapper
- type PlacementRuleConfigType
- type QueueConfigType
- type SleepPodConfig
- type TestPodConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareQueueMap ¶
Takes 2 restClient responses with queue information, and checks if they are the same by
- Validates queue name is same
- Validates qA and qB have same number of sub-queues 3a. If same queue name and 0 sub-queues, return true 3b. Otherwise, call CompareQueueMap on each child pairing of qA and qB
func CreateLogFile ¶
CreateLogFile creates the ReportDirectory if it is not present, writes the given testdata to the given filename.
func CreateReportDirectory ¶
CreateReportDirectory creates and returns the directory path If the directory cannot be created it'll return an error
func GetAbsPath ¶
func GetFileContents ¶
func GetSubQueues ¶
Returns a list of the children Q's of input. If no children, returns nil
func GetTestName ¶
func GetTestName() string
GetTestName returns the test Name in a single string without spaces or /
func InitSleepPod ¶
func InitSleepPod(conf SleepPodConfig) *v1.Pod
TestPodConfig template for sleepPods
func InitTestPod ¶
func InitTestPod(conf TestPodConfig) *v1.Pod
func ReportDirectoryPath ¶
func ReportDirectoryPath() string
ReportDirectoryPath determines the directory path.
func SliceExists ¶
Types ¶
type LimitsConfigType ¶
type PartitionConfigType ¶
type PartitionConfigType struct { Name string Queues []*QueueConfigType `yaml:",omitempty"` //Optional args PlacementRules []*PlacementRuleConfigType `yaml:",omitempty"` Limits LimitsConfigType `yaml:",omitempty"` Preemption bool `yaml:",omitempty"` }
type PartitionsWrapper ¶
type PartitionsWrapper struct {
Partitions []*PartitionConfigType
}
Holds all partitions
func CreateBasicConfigMap ¶
func CreateBasicConfigMap() *PartitionsWrapper
func (*PartitionsWrapper) AddQueue ¶
func (pw *PartitionsWrapper) AddQueue(partition string, parentPathStr string, newQ *QueueConfigType) error
func (*PartitionsWrapper) SetSchedulingPolicy ¶
func (pw *PartitionsWrapper) SetSchedulingPolicy(partition string, queuePathStr string, policy string) error
Expects queuePath to use periods as delimiters. ie "root.queueA.child"
func (*PartitionsWrapper) ToYAML ¶
func (pw *PartitionsWrapper) ToYAML() (string, error)
Converts partitionsWrapper to YAML string
type PlacementRuleConfigType ¶
type QueueConfigType ¶
type QueueConfigType struct { Name string Parent bool `yaml:",omitempty"` Queues []*QueueConfigType `yaml:",omitempty"` Properties map[string]string `yaml:",omitempty"` AdminACL string `yaml:",omitempty"` SubmitACL string `yaml:",omitempty"` Limits *LimitsConfigType `yaml:",omitempty"` // Add structs Resources string `yaml:",omitempty"` }
type SleepPodConfig ¶
type TestPodConfig ¶
type TestPodConfig struct { Name string Namespace string Affinity *v1.Affinity Annotations, Labels, NodeSelector map[string]string Resources *v1.ResourceRequirements RuntimeClassHandler *string Tolerations []v1.Toleration NodeName string Ports []v1.ContainerPort OwnerReferences []metav1.OwnerReference PriorityClassName string DeletionGracePeriodSeconds *int64 TopologySpreadConstraints []v1.TopologySpreadConstraint Image string RestartPolicy v1.RestartPolicy Command []string }