Documentation ¶
Index ¶
- type ClusterAPI
- func (api *ClusterAPI) CreateNetworkAttachmentDefinition(nadName, bridgeName, config string)
- func (api *ClusterAPI) CreatePrivilegedPodWithIP(podName, nadName, bridgeName, cidr, additionalCommands string)
- func (api *ClusterAPI) CreateTestNamespace()
- func (api *ClusterAPI) DeletePodsInTestNamespace()
- func (api *ClusterAPI) PingFromPod(podName, containerName, targetIP string) error
- func (api *ClusterAPI) ReadFileFromPod(podName, containerName, filePath string) (string, error)
- func (api *ClusterAPI) RemoveNetworkAttachmentDefinition(nadName string)
- func (api *ClusterAPI) RemoveTestNamespace()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterAPI ¶
type ClusterAPI struct { Clientset *kubernetes.Clientset NetClient *netclient.K8sCniCncfIoV1Client RestConfig *restclient.Config }
ClusterAPI object containing k8s cni cncf api client referneces
func NewClusterAPI ¶
func NewClusterAPI(kubeconfig string) *ClusterAPI
NewClusterAPI creates and returns new cluster API object
func (*ClusterAPI) CreateNetworkAttachmentDefinition ¶
func (api *ClusterAPI) CreateNetworkAttachmentDefinition(nadName, bridgeName, config string)
CreateNetworkAttachmentDefinition creates nad object on the test namespace
func (*ClusterAPI) CreatePrivilegedPodWithIP ¶
func (api *ClusterAPI) CreatePrivilegedPodWithIP(podName, nadName, bridgeName, cidr, additionalCommands string)
CreatePrivilegedPodWithIP creates a pod attached with ovs via secondary network
func (*ClusterAPI) CreateTestNamespace ¶
func (api *ClusterAPI) CreateTestNamespace()
CreateTestNamespace creates a test namespace on the k8s cluster
func (*ClusterAPI) DeletePodsInTestNamespace ¶
func (api *ClusterAPI) DeletePodsInTestNamespace()
DeletePodsInTestNamespace deletes all the pods in the test namespace
func (*ClusterAPI) PingFromPod ¶
func (api *ClusterAPI) PingFromPod(podName, containerName, targetIP string) error
PingFromPod run the ping command on the pod container towards targetIP
func (*ClusterAPI) ReadFileFromPod ¶ added in v0.28.0
func (api *ClusterAPI) ReadFileFromPod(podName, containerName, filePath string) (string, error)
ReadFileFromPod run the cat command on the pod container to read the content of a file
func (*ClusterAPI) RemoveNetworkAttachmentDefinition ¶
func (api *ClusterAPI) RemoveNetworkAttachmentDefinition(nadName string)
RemoveNetworkAttachmentDefinition deletes nad object from test namespace
func (*ClusterAPI) RemoveTestNamespace ¶
func (api *ClusterAPI) RemoveTestNamespace()
RemoveTestNamespace removes the test namespace from the k8s cluster