forked from cloudfoundry/bosh-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_net_manager.go
32 lines (24 loc) · 887 Bytes
/
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
package fakes
import (
boshsettings "github.com/cloudfoundry/bosh-agent/settings"
)
type FakeManager struct {
FakeDefaultNetworkResolver
SetupNetworkingNetworks boshsettings.Networks
SetupNetworkingErr error
GetConfiguredNetworkInterfacesInterfaces []string
GetConfiguredNetworkInterfacesErr error
SetupDhcpNetworks boshsettings.Networks
SetupDhcpErr error
}
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
}