From d714b3bbb0fe415d38178d3f9be885ed82c70b3f Mon Sep 17 00:00:00 2001 From: insanity Date: Sun, 10 Jun 2018 18:09:35 +0900 Subject: [PATCH] infra modifying --- .../model/meta/MetaTargetHostType.java | 32 ++++++++++++++++++- .../infra/InfraHostApplicationService.java | 14 ++++++++ .../central/infra/InfraHostDaemonService.java | 13 ++++++++ .../central/infra/InfraHostIPService.java | 14 ++++++++ .../infra/InfraHostMachineService.java | 12 +++++++ .../central/infra/InfraHostOSService.java | 13 ++++++++ .../central/infra/InfraHostPortService.java | 14 ++++++++ .../central/infra/InfraHostService.java | 4 --- .../central/infra/InfraMachineService.java | 13 -------- .../infra/InfraOSApplicationService.java | 14 -------- .../central/infra/InfraOSDaemonService.java | 14 -------- .../central/infra/InfraOSPortService.java | 16 ---------- .../service/central/infra/InfraOSService.java | 14 -------- .../central/infra/InfraZoneService.java | 14 ++++++++ .../central/meta/MetaInfraVendorService.java | 15 --------- .../meta/MetaProbeArchitectureService.java | 15 --------- .../central/meta/MetaProbeOsService.java | 15 --------- .../central/meta/MetaProbePackageService.java | 15 --------- .../meta/MetaProbeTaskTypeService.java | 15 --------- .../central/meta/MetaProbeVersionService.java | 15 --------- .../meta/MetaVendorCrawlerService.java | 19 ----------- .../service/central/target/TargetService.java | 1 - 22 files changed, 125 insertions(+), 186 deletions(-) create mode 100644 src/main/java/com/loafle/overflow/service/central/infra/InfraHostApplicationService.java create mode 100644 src/main/java/com/loafle/overflow/service/central/infra/InfraHostDaemonService.java create mode 100644 src/main/java/com/loafle/overflow/service/central/infra/InfraHostIPService.java create mode 100644 src/main/java/com/loafle/overflow/service/central/infra/InfraHostMachineService.java create mode 100644 src/main/java/com/loafle/overflow/service/central/infra/InfraHostOSService.java create mode 100644 src/main/java/com/loafle/overflow/service/central/infra/InfraHostPortService.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/infra/InfraMachineService.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/infra/InfraOSApplicationService.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/infra/InfraOSDaemonService.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/infra/InfraOSPortService.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/infra/InfraOSService.java create mode 100644 src/main/java/com/loafle/overflow/service/central/infra/InfraZoneService.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/meta/MetaInfraVendorService.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/meta/MetaProbeArchitectureService.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/meta/MetaProbeOsService.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/meta/MetaProbePackageService.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/meta/MetaProbeTaskTypeService.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/meta/MetaProbeVersionService.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/meta/MetaVendorCrawlerService.java diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaTargetHostType.java b/src/main/java/com/loafle/overflow/model/meta/MetaTargetHostType.java index 99b7cfe..88a681e 100644 --- a/src/main/java/com/loafle/overflow/model/meta/MetaTargetHostType.java +++ b/src/main/java/com/loafle/overflow/model/meta/MetaTargetHostType.java @@ -20,7 +20,37 @@ public class MetaTargetHostType extends MetaTargetType { static { Map mapping = new HashMap<>(); - + mapping.put("UNKNOWN", 100); + mapping.put("ALPINE_LINUX", 101); + mapping.put("AMAZON_LINUX", 102); + mapping.put("ANDROID", 103); + mapping.put("CENTOS", 104); + mapping.put("CISCO_IOS", 105); + mapping.put("COREOS", 106); + mapping.put("DARWIN", 107); + mapping.put("DEBIAN", 108); + mapping.put("FEDORA", 109); + mapping.put("FREEBSD", 110); + mapping.put("HP_UX", 111); + mapping.put("IBM_AIX", 112); + mapping.put("IBM_AS_400", 113); + mapping.put("IBM_POWER8", 114); + mapping.put("IOS", 115); + mapping.put("LINUX", 116); + mapping.put("MAC_OS_X", 117); + mapping.put("MAC_OS_X_SERVE", 118); + mapping.put("NETBSD", 119); + mapping.put("NOVELL_NETWARE", 120); + mapping.put("OPENBSD", 121); + mapping.put("ORACLE_LINUX", 122); + mapping.put("RASPBIAN", 123); + mapping.put("RHEL", 124); + mapping.put("SOLARIS", 125); + mapping.put("SUSE", 126); + mapping.put("UBUNTU", 127); + mapping.put("UBUNTU_SERVER", 128); + mapping.put("WINDOWS", 129); + mapping.put("WINDOWS_SERVER", 130); MetaTargetHostType.mapping.putAll(mapping); } diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraHostApplicationService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostApplicationService.java new file mode 100644 index 0000000..1f08df0 --- /dev/null +++ b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostApplicationService.java @@ -0,0 +1,14 @@ +package com.loafle.overflow.service.central.infra; + +import com.loafle.overflow.core.exception.OverflowException; +import com.loafle.overflow.model.infra.InfraHostApplication; + +/** + * Created by insanity on 17. 6. 28. + */ + +public interface InfraHostApplicationService { + InfraHostApplication regist(InfraHostApplication infraOSApplication) throws OverflowException; + + InfraHostApplication read(Long id) throws OverflowException; +} diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraHostDaemonService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostDaemonService.java new file mode 100644 index 0000000..9ab1613 --- /dev/null +++ b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostDaemonService.java @@ -0,0 +1,13 @@ +package com.loafle.overflow.service.central.infra; + +import com.loafle.overflow.core.exception.OverflowException; +import com.loafle.overflow.model.infra.InfraHostDaemon; + +/** + * Created by insanity on 17. 6. 28. + */ + +public interface InfraHostDaemonService { + InfraHostDaemon regist(InfraHostDaemon infraHostDaemon) throws OverflowException; + InfraHostDaemon read(Long id) throws OverflowException; +} diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraHostIPService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostIPService.java new file mode 100644 index 0000000..09c8cda --- /dev/null +++ b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostIPService.java @@ -0,0 +1,14 @@ +package com.loafle.overflow.service.central.infra; + +import com.loafle.overflow.core.exception.OverflowException; +import com.loafle.overflow.model.infra.InfraHostIP; + +/** + * Created by insanity on 17. 6. 28. + */ + +public interface InfraHostIPService { + InfraHostIP regist(InfraHostIP infraHostIP) throws OverflowException; + InfraHostIP read(Long id) throws OverflowException; + InfraHostIP readByInfraOSIDAndPortAndPortType(Long infraOSID, Integer port, String portType) throws OverflowException; +} diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraHostMachineService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostMachineService.java new file mode 100644 index 0000000..b18e787 --- /dev/null +++ b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostMachineService.java @@ -0,0 +1,12 @@ +package com.loafle.overflow.service.central.infra; + +import com.loafle.overflow.core.exception.OverflowException; +import com.loafle.overflow.model.infra.InfraHostMachine; + +/** + * Created by insanity on 17. 6. 28. + */ +public interface InfraHostMachineService { + InfraHostMachine regist(InfraHostMachine infraHostMachine) throws OverflowException; + InfraHostMachine read(Long id) throws OverflowException; +} diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraHostOSService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostOSService.java new file mode 100644 index 0000000..d43216e --- /dev/null +++ b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostOSService.java @@ -0,0 +1,13 @@ +package com.loafle.overflow.service.central.infra; + +import com.loafle.overflow.core.exception.OverflowException; +import com.loafle.overflow.model.infra.InfraHostOS; + +/** + * Created by insanity on 17. 6. 28. + */ + +public interface InfraHostOSService { + InfraHostOS regist(InfraHostOS infraHostOS) throws OverflowException; + InfraHostOS read(Long id) throws OverflowException; +} diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraHostPortService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostPortService.java new file mode 100644 index 0000000..d83c389 --- /dev/null +++ b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostPortService.java @@ -0,0 +1,14 @@ +package com.loafle.overflow.service.central.infra; + +import com.loafle.overflow.core.exception.OverflowException; +import com.loafle.overflow.model.infra.InfraHostPort; + +/** + * Created by insanity on 17. 6. 28. + */ + +public interface InfraHostPortService { + InfraHostPort regist(InfraHostPort infraHostPort) throws OverflowException; + InfraHostPort read(Long id) throws OverflowException; + // InfraHostPort readByInfraOSIDAndPortAndPortType(Long infraOSID, Integer port, String portType) throws OverflowException; +} diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraHostService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostService.java index 376b25f..9944ac0 100644 --- a/src/main/java/com/loafle/overflow/service/central/infra/InfraHostService.java +++ b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostService.java @@ -8,10 +8,6 @@ import com.loafle.overflow.model.infra.InfraHost; */ public interface InfraHostService { - InfraHost regist(InfraHost infraHost) throws OverflowException; - InfraHost read(Long id) throws OverflowException; - - InfraHost readByProbeIdAndIpv4(Long probeId, String ip) throws OverflowException; } diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraMachineService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraMachineService.java deleted file mode 100644 index 4bfb97b..0000000 --- a/src/main/java/com/loafle/overflow/service/central/infra/InfraMachineService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.loafle.overflow.service.central.infra; - -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.infra.InfraMachine; - -/** - * Created by insanity on 17. 6. 28. - */ -public interface InfraMachineService { - InfraMachine regist(InfraMachine infraMachine) throws OverflowException; - - InfraMachine read(Long id) throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraOSApplicationService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraOSApplicationService.java deleted file mode 100644 index c61fd5a..0000000 --- a/src/main/java/com/loafle/overflow/service/central/infra/InfraOSApplicationService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.loafle.overflow.service.central.infra; - -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.infra.InfraOSApplication; - -/** - * Created by insanity on 17. 6. 28. - */ - -public interface InfraOSApplicationService { - InfraOSApplication regist(InfraOSApplication infraOSApplication) throws OverflowException; - - InfraOSApplication read(Long id) throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraOSDaemonService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraOSDaemonService.java deleted file mode 100644 index 3b279f1..0000000 --- a/src/main/java/com/loafle/overflow/service/central/infra/InfraOSDaemonService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.loafle.overflow.service.central.infra; - -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.infra.InfraOSDaemon; - -/** - * Created by insanity on 17. 6. 28. - */ - -public interface InfraOSDaemonService { - InfraOSDaemon regist(InfraOSDaemon infraOSDaemon) throws OverflowException; - - InfraOSDaemon read(Long id) throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraOSPortService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraOSPortService.java deleted file mode 100644 index 63a28d1..0000000 --- a/src/main/java/com/loafle/overflow/service/central/infra/InfraOSPortService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.loafle.overflow.service.central.infra; - -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.infra.InfraOSPort; - -/** - * Created by insanity on 17. 6. 28. - */ - -public interface InfraOSPortService { - InfraOSPort regist(InfraOSPort infraOSPort) throws OverflowException; - - InfraOSPort read(Long id) throws OverflowException; - - InfraOSPort readByInfraOSIDAndPortAndPortType(Long infraOSID, Integer port, String portType) throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraOSService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraOSService.java deleted file mode 100644 index 7fd184a..0000000 --- a/src/main/java/com/loafle/overflow/service/central/infra/InfraOSService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.loafle.overflow.service.central.infra; - -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.infra.InfraOS; - -/** - * Created by insanity on 17. 6. 28. - */ - -public interface InfraOSService { - InfraOS regist(InfraOS infraOS) throws OverflowException; - - InfraOS read(Long id) throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraZoneService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraZoneService.java new file mode 100644 index 0000000..96045b6 --- /dev/null +++ b/src/main/java/com/loafle/overflow/service/central/infra/InfraZoneService.java @@ -0,0 +1,14 @@ +package com.loafle.overflow.service.central.infra; + +import com.loafle.overflow.core.exception.OverflowException; +import com.loafle.overflow.model.infra.InfraZone; + +/** + * Created by insanity on 17. 6. 28. + */ + +public interface InfraZoneService { + InfraZone regist(InfraZone infraZone) throws OverflowException; + InfraZone read(Long id) throws OverflowException; + InfraZone readAllByDomainID(Long domainID) throws OverflowException; +} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaInfraVendorService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaInfraVendorService.java deleted file mode 100644 index 5a13efe..0000000 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaInfraVendorService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.loafle.overflow.service.central.meta; - -import com.loafle.overflow.core.annotation.WebappAPI; -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.meta.MetaInfraVendor; - -import java.util.List; - -/** - * Created by snoop on 17. 7. 27. - */ -public interface MetaInfraVendorService { - @WebappAPI - List readAllByMetaInfraTypeID(Integer metaInfraTypeID) throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaProbeArchitectureService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaProbeArchitectureService.java deleted file mode 100644 index e201bca..0000000 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaProbeArchitectureService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.loafle.overflow.service.central.meta; - -import com.loafle.overflow.core.annotation.WebappAPI; -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.meta.MetaProbeArchitecture; - -import java.util.List; - -/** - * Created by snoop on 17. 7. 27. - */ -public interface MetaProbeArchitectureService { - @WebappAPI - List readAll() throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaProbeOsService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaProbeOsService.java deleted file mode 100644 index a754bea..0000000 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaProbeOsService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.loafle.overflow.service.central.meta; - -import com.loafle.overflow.core.annotation.WebappAPI; -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.meta.MetaProbeOs; - -import java.util.List; - -/** - * Created by snoop on 17. 7. 27. - */ -public interface MetaProbeOsService { - @WebappAPI - List readAll() throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaProbePackageService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaProbePackageService.java deleted file mode 100644 index 4a4c8ad..0000000 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaProbePackageService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.loafle.overflow.service.central.meta; - -import com.loafle.overflow.core.annotation.WebappAPI; -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.meta.MetaProbePackage; - -import java.util.List; - -/** - * Created by snoop on 17. 7. 27. - */ -public interface MetaProbePackageService { - @WebappAPI - List readAllByMetaProbeOsID(Short metaProbeOsID) throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaProbeTaskTypeService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaProbeTaskTypeService.java deleted file mode 100644 index 9f42e77..0000000 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaProbeTaskTypeService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.loafle.overflow.service.central.meta; - -import com.loafle.overflow.core.annotation.WebappAPI; -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.meta.MetaProbeTaskType; - -import java.util.List; - -/** - * Created by snoop on 17. 7. 27. - */ -public interface MetaProbeTaskTypeService { - @WebappAPI - List readAll() throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaProbeVersionService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaProbeVersionService.java deleted file mode 100644 index 01defae..0000000 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaProbeVersionService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.loafle.overflow.service.central.meta; - -import com.loafle.overflow.core.annotation.WebappAPI; -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.meta.MetaProbeVersion; - -import java.util.List; - -/** - * Created by snoop on 17. 7. 27. - */ -public interface MetaProbeVersionService { - @WebappAPI - List readAll() throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaVendorCrawlerService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaVendorCrawlerService.java deleted file mode 100644 index 375ade4..0000000 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaVendorCrawlerService.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.loafle.overflow.service.central.meta; - -import com.loafle.overflow.core.annotation.WebappAPI; -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.meta.MetaVendorCrawler; - -import java.util.List; - -/** - * Created by snoop on 17. 7. 27. - */ -public interface MetaVendorCrawlerService { - - @WebappAPI - List readAllByMetaInfraVendorID(Integer metaInfraVendorID) throws OverflowException; - - @WebappAPI - MetaVendorCrawler regist(MetaVendorCrawler metaVendorCrawler) throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/target/TargetService.java b/src/main/java/com/loafle/overflow/service/central/target/TargetService.java index d67d5f3..d5c0c7b 100644 --- a/src/main/java/com/loafle/overflow/service/central/target/TargetService.java +++ b/src/main/java/com/loafle/overflow/service/central/target/TargetService.java @@ -7,7 +7,6 @@ import com.loafle.overflow.core.exception.OverflowException; import com.loafle.overflow.core.model.PageParams; import com.loafle.overflow.model.discovery.Host; import com.loafle.overflow.model.discovery.Service; -import com.loafle.overflow.model.probe.Probe; import com.loafle.overflow.model.target.Target; import org.springframework.data.domain.Page;