infra modifying

This commit is contained in:
insanity 2018-06-10 18:09:35 +09:00
parent 77147b2267
commit d714b3bbb0
22 changed files with 125 additions and 186 deletions

View File

@ -20,7 +20,37 @@ public class MetaTargetHostType extends MetaTargetType {
static { static {
Map<String, Integer> mapping = new HashMap<>(); Map<String, Integer> 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); MetaTargetHostType.mapping.putAll(mapping);
} }

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -8,10 +8,6 @@ import com.loafle.overflow.model.infra.InfraHost;
*/ */
public interface InfraHostService { public interface InfraHostService {
InfraHost regist(InfraHost infraHost) throws OverflowException; InfraHost regist(InfraHost infraHost) throws OverflowException;
InfraHost read(Long id) throws OverflowException; InfraHost read(Long id) throws OverflowException;
InfraHost readByProbeIdAndIpv4(Long probeId, String ip) throws OverflowException;
} }

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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<MetaInfraVendor> readAllByMetaInfraTypeID(Integer metaInfraTypeID) throws OverflowException;
}

View File

@ -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<MetaProbeArchitecture> readAll() throws OverflowException;
}

View File

@ -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<MetaProbeOs> readAll() throws OverflowException;
}

View File

@ -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<MetaProbePackage> readAllByMetaProbeOsID(Short metaProbeOsID) throws OverflowException;
}

View File

@ -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<MetaProbeTaskType> readAll() throws OverflowException;
}

View File

@ -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<MetaProbeVersion> readAll() throws OverflowException;
}

View File

@ -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<MetaVendorCrawler> readAllByMetaInfraVendorID(Integer metaInfraVendorID) throws OverflowException;
@WebappAPI
MetaVendorCrawler regist(MetaVendorCrawler metaVendorCrawler) throws OverflowException;
}

View File

@ -7,7 +7,6 @@ import com.loafle.overflow.core.exception.OverflowException;
import com.loafle.overflow.core.model.PageParams; import com.loafle.overflow.core.model.PageParams;
import com.loafle.overflow.model.discovery.Host; import com.loafle.overflow.model.discovery.Host;
import com.loafle.overflow.model.discovery.Service; import com.loafle.overflow.model.discovery.Service;
import com.loafle.overflow.model.probe.Probe;
import com.loafle.overflow.model.target.Target; import com.loafle.overflow.model.target.Target;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;