This commit is contained in:
crusader 2018-06-10 19:31:45 +09:00
parent d870cc2a89
commit c320f55122

View File

@ -16,7 +16,6 @@ import com.loafle.overflow.model.discovery.Service;
import com.loafle.overflow.model.infra.InfraHost; import com.loafle.overflow.model.infra.InfraHost;
import com.loafle.overflow.model.infra.InfraService; import com.loafle.overflow.model.infra.InfraService;
import com.loafle.overflow.model.meta.MetaInfraType; import com.loafle.overflow.model.meta.MetaInfraType;
import com.loafle.overflow.model.meta.MetaInfraVendor;
import com.loafle.overflow.model.probe.Probe; import com.loafle.overflow.model.probe.Probe;
import com.loafle.overflow.model.target.Target; import com.loafle.overflow.model.target.Target;
import com.loafle.overflow.service.central.target.TargetService; import com.loafle.overflow.service.central.target.TargetService;
@ -149,9 +148,9 @@ public class CentralTargetService implements TargetService {
InfraHost infraHost = new InfraHost(); InfraHost infraHost = new InfraHost();
infraHost.setMetaInfraType(new MetaInfraType(2)); infraHost.setMetaInfraType(new MetaInfraType(2));
infraHost.setProbe(new Probe(probeId)); infraHost.setProbe(new Probe(probeId));
infraHost.setIpv4(host.getIpv4()); // infraHost.setIpv4(host.getIpv4());
infraHost.setIpv6(host.getIpv6()); // infraHost.setIpv6(host.getIpv6());
infraHost.setMac(host.getMac()); // infraHost.setMac(host.getMac());
return this.infraHostService.regist(infraHost); return this.infraHostService.regist(infraHost);
} }
@ -159,11 +158,11 @@ public class CentralTargetService implements TargetService {
throws OverflowException { throws OverflowException {
InfraService infraService = new InfraService(); InfraService infraService = new InfraService();
infraHost.setMetaInfraType(new MetaInfraType(7)); infraHost.setMetaInfraType(new MetaInfraType(7));
infraService.setInfraHost(infraHost); // infraService.setInfraHost(infraHost);
infraService.setPort(service.getPort().getPortNumber()); // infraService.setPort(service.getPort().getPortNumber());
infraService.setPortType(service.getPort().getPortType().toString()); // infraService.setPortType(service.getPort().getPortType().toString());
infraService.setTlsType(service.getCryptoType() == CryptoType.TLS); // infraService.setTlsType(service.getCryptoType() == CryptoType.TLS);
infraService.setMetaInfraVendor(MetaInfraVendor.CreateInfraVendorByService(service.getServiceName())); // infraService.setMetaInfraVendor(MetaInfraVendor.CreateInfraVendorByService(service.getServiceName()));
return this.infraServiceService.regist(infraService); return this.infraServiceService.regist(infraService);
} }