Set session host

Add ping to L2 router
This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-08-08 10:10:52 -03:00
parent ed7cefcf9c
commit 0e9716d5b0
9 changed files with 76 additions and 61 deletions

View File

@@ -33,6 +33,7 @@ type DockerApi interface {
CreateNetwork(id string) error
ConnectNetwork(container, network, ip string) (string, error)
GetDaemonInfo() (types.Info, error)
GetDaemonHost() string
GetSwarmPorts() ([]string, []uint16, error)
GetPorts() ([]uint16, error)
GetContainerStats(name string) (io.ReadCloser, error)
@@ -102,6 +103,10 @@ func (d *docker) GetDaemonInfo() (types.Info, error) {
return d.c.Info(context.Background())
}
func (d *docker) GetDaemonHost() string {
return d.c.DaemonHost()
}
func (d *docker) GetSwarmPorts() ([]string, []uint16, error) {
hosts := []string{}
ports := []uint16{}

View File

@@ -28,6 +28,11 @@ func (m *Mock) GetDaemonInfo() (types.Info, error) {
return args.Get(0).(types.Info), args.Error(1)
}
func (m *Mock) GetDaemonHost() string {
args := m.Called()
return args.String(0)
}
func (m *Mock) GetSwarmPorts() ([]string, []uint16, error) {
args := m.Called()
return args.Get(0).([]string), args.Get(1).([]uint16), args.Error(2)