sensorconfig bugfix

This commit is contained in:
insanity 2018-07-03 11:35:24 +09:00
parent ffcc2407cb
commit 50c124de2b
3 changed files with 3 additions and 11 deletions

View File

@ -1,8 +1,5 @@
package com.loafle.overflow.central.module.infra.service; package com.loafle.overflow.central.module.infra.service;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.loafle.overflow.central.module.infra.dao.InfraDAO; import com.loafle.overflow.central.module.infra.dao.InfraDAO;
import com.loafle.overflow.central.module.infra.dao.InfraHostDAO; import com.loafle.overflow.central.module.infra.dao.InfraHostDAO;
import com.loafle.overflow.central.module.infra.dao.InfraServiceDAO; import com.loafle.overflow.central.module.infra.dao.InfraServiceDAO;
@ -35,17 +32,11 @@ import org.springframework.transaction.annotation.Transactional;
import inet.ipaddr.IPAddress; import inet.ipaddr.IPAddress;
import inet.ipaddr.IPAddressString; import inet.ipaddr.IPAddressString;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Base64;
import java.util.List; import java.util.List;
import java.util.zip.GZIPInputStream;
@Service("InfraService") @Service("InfraService")
public class CentralInfraService implements InfraService { public class CentralInfraService implements InfraService {
@Autowired
private ObjectMapper objectMapper;
@Autowired @Autowired
ProbeService probeService; ProbeService probeService;

View File

@ -149,6 +149,7 @@ public class CentralSensorConfigService {
} else if (metaInfraType.getKey().equals("SERVICE")) { } else if (metaInfraType.getKey().equals("SERVICE")) {
InfraService infraService = (InfraService) infra; InfraService infraService = (InfraService) infra;
metaIPTypeKey = infraService.getInfraHostPort().getInfraHostIP().getMetaIPType().getKey();
InfraHostIPAddress = infraService.getInfraHostPort().getInfraHostIP().getAddress(); InfraHostIPAddress = infraService.getInfraHostPort().getInfraHostIP().getAddress();
infraHostPort = infraService.getInfraHostPort(); infraHostPort = infraService.getInfraHostPort();
metaCryptoType = infraService.getMetaCryptoType(); metaCryptoType = infraService.getMetaCryptoType();

View File

@ -41,6 +41,7 @@ public class CentralInfraServiceTest {
// probeID, List<Host>, List<Service> // probeID, List<Host>, List<Service>
@Test @Test
@Ignore
public void registDiscoverd() throws OverflowException { public void registDiscoverd() throws OverflowException {
List<Host> hosts = new ArrayList<>(5); List<Host> hosts = new ArrayList<>(5);
List<Service> services = new ArrayList<>(5); List<Service> services = new ArrayList<>(5);
@ -95,8 +96,7 @@ public class CentralInfraServiceTest {
// } // }
List<Infra> infras = this.centralInfraService.registDiscoverd(Long.valueOf((long) 1), hosts, services); List<Infra> infras = this.centralInfraService.registDiscoverd(Long.valueOf((long) 1), hosts, services);
// System.out.println("CentralInfraServiceTest Infra List Size: " + System.out.println("CentralInfraServiceTest Infra List Size: " + infras.size());
// infras.size());
} }
@Test @Test