Documentation ¶
Index ¶
- func BasicClockSyncCheck(fullConfig testconfig.TestConfig, ptpConfig *ptpv1.PtpConfig, gmID *string) error
- func CheckSlaveSyncWithMaster(fullConfig testconfig.TestConfig)
- func CreatePtpTestPrivilegedDaemonSet(daemonsetName, daemonsetNamespace, daemonsetContainerName string) *corev1.PodList
- func DeletePtpTestPrivilegedDaemonSet(daemonsetName, daemonsetNamespace string)
- func GetContainerCpuUsage(podName, containerName, podNamespace string, rateTimeWindow time.Duration, ...) (float64, error)
- func GetPodTotalCpuUsage(podName, podNamespace string, rateTimeWindow time.Duration, ...) (float64, error)
- func GetPtpPodsPerNode() (map[string][]*corev1.Pod, error)
- func RebootSlaveNode(fullConfig testconfig.TestConfig)
- func RecoverySlaveNetworkOutage(fullConfig testconfig.TestConfig, skippedInterfaces map[string]bool)
- func VerifyAfterRebootState(rebootedNodes []string, fullConfig testconfig.TestConfig)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicClockSyncCheck ¶
func BasicClockSyncCheck(fullConfig testconfig.TestConfig, ptpConfig *ptpv1.PtpConfig, gmID *string) error
waits for the foreign master to appear in the logs and checks the clock accuracy
func CheckSlaveSyncWithMaster ¶
func CheckSlaveSyncWithMaster(fullConfig testconfig.TestConfig)
func CreatePtpTestPrivilegedDaemonSet ¶
func CreatePtpTestPrivilegedDaemonSet(daemonsetName, daemonsetNamespace, daemonsetContainerName string) *corev1.PodList
To create a ptp test privileged daemonset
func DeletePtpTestPrivilegedDaemonSet ¶
func DeletePtpTestPrivilegedDaemonSet(daemonsetName, daemonsetNamespace string)
To delete a ptp test priviledged daemonset
func GetContainerCpuUsage ¶
func GetContainerCpuUsage(podName, containerName, podNamespace string, rateTimeWindow time.Duration, prometheusPod *corev1.Pod) (float64, error)
GetContainerCpuUsage uses prometheus metric "container_cpu_usage_seconds_total" to return the cpu usage for a container in a pod. As each query needs to be done inside one of the prometheus pods, an optional param prometheusPod can be set for that purpose. If it's nil, the function will try to get it on every call.
func GetPodTotalCpuUsage ¶
func GetPodTotalCpuUsage(podName, podNamespace string, rateTimeWindow time.Duration, prometheusPod *corev1.Pod) (float64, error)
GetPodTotalCpuUsage uses prometheus metric "container_cpu_usage_seconds_total" to return the total cpu usage by all the given pods. As each query needs to be done inside one of the prometheus pods, an optional param prometheusPod can be set for that purpose. If it's nil, the function will try to get it on every call.
func GetPtpPodsPerNode ¶
GetPtpPodsPerNode is a helper method to get a map of ptp-related pods (daemonset + operator) that are deployed on each node.
func RebootSlaveNode ¶
func RebootSlaveNode(fullConfig testconfig.TestConfig)
func RecoverySlaveNetworkOutage ¶
func RecoverySlaveNetworkOutage(fullConfig testconfig.TestConfig, skippedInterfaces map[string]bool)
func VerifyAfterRebootState ¶
func VerifyAfterRebootState(rebootedNodes []string, fullConfig testconfig.TestConfig)
Types ¶
This section is empty.