kubernetes: k8s.io/kubernetes/pkg/util/netsh/testing Index | Files

package testing

import "k8s.io/kubernetes/pkg/util/netsh/testing"


Package Files


type FakeNetsh Uses

type FakeNetsh struct {

FakeNetsh is a no-op implementation of the netsh Interface

func NewFake Uses

func NewFake() *FakeNetsh

NewFake returns a fakenetsh no-op implementation of the netsh Interface

func (*FakeNetsh) DeleteIPAddress Uses

func (*FakeNetsh) DeleteIPAddress(args []string) error

DeleteIPAddress checks if the specified IP address is present and, if so, deletes it.

func (*FakeNetsh) DeletePortProxyRule Uses

func (*FakeNetsh) DeletePortProxyRule(args []string) error

DeletePortProxyRule deletes the specified portproxy rule. If the rule did not exist, return error.

func (*FakeNetsh) EnsureIPAddress Uses

func (*FakeNetsh) EnsureIPAddress(args []string, ip net.IP) (bool, error)

EnsureIPAddress checks if the specified IP Address is added to vEthernet (HNSTransparent) interface, if not, add it. If the address existed, return true.

func (*FakeNetsh) EnsurePortProxyRule Uses

func (*FakeNetsh) EnsurePortProxyRule(args []string) (bool, error)

EnsurePortProxyRule function implementing the netsh interface and always returns true and nil without any error

func (*FakeNetsh) GetInterfaceToAddIP Uses

func (*FakeNetsh) GetInterfaceToAddIP() string

GetInterfaceToAddIP returns the interface name where Service IP needs to be added IP Address needs to be added for netsh portproxy to redirect traffic Reads Environment variable INTERFACE_TO_ADD_SERVICE_IP, if it is not defined then "vEthernet (HNSTransparent)" is returned

func (*FakeNetsh) Restore Uses

func (*FakeNetsh) Restore(args []string) error

Restore runs `netsh exec` to restore portproxy or addresses using a file. TODO Check if this is required, most likely not

Package testing imports 2 packages (graph). Updated 2019-09-12. Refresh now. Tools for package owners.