forked from cloudfoundry/bosh-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_net_manager.go
42 lines (32 loc) · 1.13 KB
/
fake_net_manager.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package fakes
import (
boshsettings "github.com/cloudfoundry/bosh-agent/settings"
)
type FakeManager struct {
FakeDefaultNetworkResolver
SetupNetworkingNetworks boshsettings.Networks
SetupNetworkingErr error
SetupIPv6Config boshsettings.IPv6
SetupIPv6StopCh <-chan struct{}
SetupIPv6Err error
GetConfiguredNetworkInterfacesInterfaces []string
GetConfiguredNetworkInterfacesErr error
SetupDhcpNetworks boshsettings.Networks
SetupDhcpErr error
}
func (net *FakeManager) SetupIPv6(config boshsettings.IPv6, stopCh <-chan struct{}) error {
net.SetupIPv6Config = config
net.SetupIPv6StopCh = stopCh
return net.SetupIPv6Err
}
func (net *FakeManager) SetupNetworking(networks boshsettings.Networks, errCh chan error) error {
net.SetupNetworkingNetworks = networks
return net.SetupNetworkingErr
}
func (net *FakeManager) GetConfiguredNetworkInterfaces() ([]string, error) {
return net.GetConfiguredNetworkInterfacesInterfaces, net.GetConfiguredNetworkInterfacesErr
}
func (net *FakeManager) SetupDhcp(networks boshsettings.Networks, errCh chan error) error {
net.SetupDhcpNetworks = networks
return net.SetupDhcpErr
}