This commit is contained in:
crusader 2018-09-03 15:03:57 +09:00
parent 57225c5b90
commit 51bf633ee8
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ func Host(hostName string, address string, mac string) *omd.Host {
return &omd.Host{
MetaIPType: omm.ToMetaIPType(omm.MetaIPTypeEnumV4),
Name: hostName,
Address: fmt.Sprintf("%s.%s", address),
Address: fmt.Sprintf("%s.%s", ZONE_NETWORK, address),
Mac: mac,
Zone: Zone(),
}

View File

@ -56,7 +56,7 @@ func Test_ofDiscoverer_DiscoverHost(t *testing.T) {
case types.DiscoveryMessageTypePort:
log.Print("Discovered Port: ", msg.Data())
case types.DiscoveryMessageTypeService:
log.Print("Discovered Service: ", msg.Data())
log.Print("Discovered Service: ", msg.Data(), " \n Port: ", msg.Data().(*omd.Service).Port, " \n Host: ", msg.Data().(*omd.Service).Port.Host)
case types.DiscoveryMessageTypeStart:
log.Print("Discovery start: ", msg.Data())
case types.DiscoveryMessageTypeStop: