diff --git a/src/main/java/com/loafle/overflow/central/module/infra/service/CentralInfraService.java b/src/main/java/com/loafle/overflow/central/module/infra/service/CentralInfraService.java index dc28e5e..487d9cd 100644 --- a/src/main/java/com/loafle/overflow/central/module/infra/service/CentralInfraService.java +++ b/src/main/java/com/loafle/overflow/central/module/infra/service/CentralInfraService.java @@ -1,8 +1,5 @@ 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.InfraHostDAO; 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.IPAddressString; -import java.io.ByteArrayInputStream; -import java.io.IOException; import java.util.ArrayList; -import java.util.Base64; import java.util.List; -import java.util.zip.GZIPInputStream; @Service("InfraService") public class CentralInfraService implements InfraService { - @Autowired - private ObjectMapper objectMapper; @Autowired ProbeService probeService; diff --git a/src/main/java/com/loafle/overflow/central/module/sensor/service/CentralSensorConfigService.java b/src/main/java/com/loafle/overflow/central/module/sensor/service/CentralSensorConfigService.java index 2e327a0..662632a 100644 --- a/src/main/java/com/loafle/overflow/central/module/sensor/service/CentralSensorConfigService.java +++ b/src/main/java/com/loafle/overflow/central/module/sensor/service/CentralSensorConfigService.java @@ -149,6 +149,7 @@ public class CentralSensorConfigService { } else if (metaInfraType.getKey().equals("SERVICE")) { InfraService infraService = (InfraService) infra; + metaIPTypeKey = infraService.getInfraHostPort().getInfraHostIP().getMetaIPType().getKey(); InfraHostIPAddress = infraService.getInfraHostPort().getInfraHostIP().getAddress(); infraHostPort = infraService.getInfraHostPort(); metaCryptoType = infraService.getMetaCryptoType(); diff --git a/src/test/java/com/loafle/overflow/central/module/infra/service/CentralInfraServiceTest.java b/src/test/java/com/loafle/overflow/central/module/infra/service/CentralInfraServiceTest.java index b5223e3..944ca03 100644 --- a/src/test/java/com/loafle/overflow/central/module/infra/service/CentralInfraServiceTest.java +++ b/src/test/java/com/loafle/overflow/central/module/infra/service/CentralInfraServiceTest.java @@ -41,6 +41,7 @@ public class CentralInfraServiceTest { // probeID, List, List @Test + @Ignore public void registDiscoverd() throws OverflowException { List hosts = new ArrayList<>(5); List services = new ArrayList<>(5); @@ -95,8 +96,7 @@ public class CentralInfraServiceTest { // } List infras = this.centralInfraService.registDiscoverd(Long.valueOf((long) 1), hosts, services); - // System.out.println("CentralInfraServiceTest Infra List Size: " + - // infras.size()); + System.out.println("CentralInfraServiceTest Infra List Size: " + infras.size()); } @Test