Gather Weave Net plugin and proxy info from report

Instead of using Docker, because after Weave Net 2.0 there are no proxy nor
plugin containers.

This has the drawback of not detecting the plugin/proxy in systems running
Weave Net < 2.0 , but I think we can live with it.
This commit is contained in:
Alfonso Acosta
2017-07-17 13:23:26 +00:00
parent a6d3542c89
commit b7d292e161
5 changed files with 60 additions and 179 deletions

View File

@@ -15,6 +15,8 @@ const (
MockContainerMAC = "d6:f2:5a:12:36:a8"
MockContainerIP = "10.0.0.123"
MockHostname = "hostname.weave.local"
MockProxyAddress = "unix:///foo/bar/weave.sock"
MockDriverName = "weave_mock"
)
// MockClient is a mock version of weave.Client
@@ -54,6 +56,12 @@ func (MockClient) Status() (weave.Status, error) {
{Size: 0, IsKnownPeer: false},
},
},
Proxy: &weave.Proxy{
Addresses: []string{MockProxyAddress},
},
Plugin: &weave.Plugin{
DriverName: MockDriverName,
},
}, nil
}