ptphelper

package
v0.0.0-...-8ce2061 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLeaseDuration

func CheckLeaseDuration(namespace string, leaseDurationDefault int32, leaseDurationSNO int32) int

func DisablePTPReferencePlugin

func DisablePTPReferencePlugin() error

func DiscoveryPTPConfiguration

func DiscoveryPTPConfiguration(namespace string) (masters, slaves []*ptpv1.PtpConfig)

Returns the slave node label to be used in the test

func EnablePTPEvent

func EnablePTPEvent() error

func EnablePTPReferencePlugin

func EnablePTPReferencePlugin() error

func GetClockIDForeign

func GetClockIDForeign(ptpConfigName string, label *string, nodeName *string) (id string, err error)

func GetClockIDMaster

func GetClockIDMaster(ptpConfigName string, label *string, nodeName *string, isGM bool) (id string, err error)

func GetFirstNode

func GetFirstNode(ptpConfig *ptpv1.PtpConfig) (*string, error)

gets the first nodename configured in the ptpconfig->spec->recommend

func GetLabel

func GetLabel(ptpConfig *ptpv1.PtpConfig) (*string, error)

Gets the first label configured in the ptpconfig->spec->recommend

func GetMasterSlaveAttachedInterfaces

func GetMasterSlaveAttachedInterfaces(pod *v1core.Pod) []string

func GetPTPConfigs

func GetPTPConfigs(namespace string) ([]ptpv1.PtpConfig, []ptpv1.PtpConfig)

Returns the slave node label to be used in the test, empty string label cound not be found

func GetPTPPodWithPTPConfig

func GetPTPPodWithPTPConfig(ptpConfig *ptpv1.PtpConfig) (aPtpPod *v1core.Pod, err error)

func GetProfileLogID

func GetProfileLogID(ptpConfigName string, label *string, nodeName *string) (id string, err error)

func GetProfileName

func GetProfileName(config *ptpv1.PtpConfig) (string, error)

Checks for DualNIC BC

func GetPtpInterfacePerNode

func GetPtpInterfacePerNode(nodeName string, ifList map[string]*l2exports.PtpIf) (out []string)

func GetPtpMasterSlaveAttachedInterfaces

func GetPtpMasterSlaveAttachedInterfaces(pod *v1core.Pod) []string

func GetPtpOperatorVersion

func GetPtpOperatorVersion() (string, error)

func GetPtpPodOnNode

func GetPtpPodOnNode(nodeName string) (v1core.Pod, error)

func IsClockUnderTestPod

func IsClockUnderTestPod(aPod *v1core.Pod) (result bool, err error)

returns true if the pod is running the clock under test

func IsExternalGM

func IsExternalGM() (out bool)

func IsGrandMasterPod

func IsGrandMasterPod(aPod *v1core.Pod) (result bool, err error)

returns true if the pod is running a grandmaster

func IsPTPEnabled

func IsPTPEnabled(ethToolOutput *bytes.Buffer) bool

This function parses ethtool command output and detect interfaces which supports ptp protocol

func IsPtpMaster

func IsPtpMaster(ptp4lOpts, phc2sysOpts *string) bool

Checks for Grand master

func IsPtpSlave

func IsPtpSlave(ptp4lOpts, phc2sysOpts *string) bool

Checks for OC

func IsSecondaryBc

func IsSecondaryBc(config *ptpv1.PtpConfig) bool

Checks for DualNIC BC

func MutateProfile

func MutateProfile(profile *ptpv1.PtpConfig, profileName, nodeName string) *ptpv1.PtpConfig

func PtpDiscoveredInterfaceList

func PtpDiscoveredInterfaceList(nodeName string) []string

func PtpEventEnabled

func PtpEventEnabled() bool

func ReplaceTestPod

func ReplaceTestPod(pod *v1core.Pod, timeout time.Duration) (v1core.Pod, error)

func RestartPTPDaemon

func RestartPTPDaemon()

func RetrievePTPProfileLabels

func RetrievePTPProfileLabels(configs []ptpv1.PtpConfig) string

func SaveStoreEventsToFile

func SaveStoreEventsToFile(allEvents, filename string)

saves events to file

func WaitForPtpDaemonToBeReady

func WaitForPtpDaemonToBeReady() int

Types

This section is empty.

Jump to

Keyboard shortcuts

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