Permalink
Browse files

Merge pull request #2047 from OpenNMS/jira/HZN-1349

HZN-1349: Remove unused DemandPollDao and related classes from code base
  • Loading branch information...
mvrueden committed Jul 10, 2018
2 parents 38bf6a3 + a271070 commit 4d496752454ee9fa11c0424723134e3d58941637
Showing with 24 additions and 1,442 deletions.
  1. +0 −1 container/features/pom.xml
  2. +24 −0 core/schema/src/main/liquibase/23.0.0/changelog.xml
  3. +0 −2 core/test-api/db/src/main/resources/import.sql
  4. +0 −61 core/test-api/db/src/test/resources/create.sql-revision-3952
  5. +0 −11 core/test-api/services/src/main/resources/minimal-eventconf.xml
  6. +0 −11 features/events/api/src/main/java/org/opennms/netmgt/events/api/EventConstants.java
  7. +0 −72 opennms-base-assembly/src/main/filtered/etc/create.sql
  8. +0 −9 opennms-base-assembly/src/main/filtered/etc/events/opennms.internal.events.xml
  9. +0 −11 ...src/main/resources/contrib/qosdaemon/qos_example_configuration/opennms_fault_config/eventconf.xml
  10. +0 −11 opennms-config/src/test/resources/org/opennms/netmgt/config/eventd/eventconf-speedtest/eventconf.xml
  11. +0 −11 opennms-config/src/test/resources/org/opennms/netmgt/config/eventd/eventconf-wildcard/eventconf.xml
  12. +0 −38 opennms-dao-api/src/main/java/org/opennms/netmgt/dao/api/DemandPollDao.java
  13. +0 −49 opennms-dao-mock/src/main/java/org/opennms/netmgt/dao/mock/MockDemandPollDao.java
  14. +0 −3 opennms-dao-mock/src/main/resources/META-INF/opennms/applicationContext-mockDao.xml
  15. +0 −11 opennms-dao-mock/src/main/resources/minimal-eventconf.xml
  16. +0 −44 opennms-dao/src/main/java/org/opennms/netmgt/dao/hibernate/DemandPollDaoHibernate.java
  17. +0 −6 opennms-dao/src/main/resources/META-INF/opennms/applicationContext-dao.xml
  18. +0 −141 opennms-model/src/main/java/org/opennms/netmgt/model/DemandPoll.java
  19. +0 −131 opennms-model/src/main/java/org/opennms/netmgt/model/PollResult.java
  20. +0 −3 opennms-services/src/main/java/org/opennms/netmgt/poller/PollerEventProcessor.java
  21. +0 −5 opennms-services/src/test/java/org/opennms/netmgt/poller/PathOutageManagerDaoIT.java
  22. +0 −21 opennms-services/src/test/java/org/opennms/netmgt/poller/PollerQueryManagerDaoIT.java
  23. +0 −11 opennms-services/src/test/resources/org/opennms/netmgt/mock/eventconf.xml
  24. +0 −45 opennms-web-api/src/main/java/org/opennms/web/svclayer/DemandPollService.java
  25. +0 −50 opennms-web-api/src/main/java/org/opennms/web/svclayer/api/PollerService.java
  26. +0 −103 opennms-web-api/src/main/java/org/opennms/web/svclayer/support/DefaultDemandPollService.java
  27. +0 −85 opennms-web-api/src/main/java/org/opennms/web/svclayer/support/DefaultPollerService.java
  28. +0 −8 opennms-webapp/src/main/resources/org/opennms/web/svclayer/applicationContext-svclayer.xml
  29. +0 −109 opennms-webapp/src/test/java/org/opennms/web/services/PollerServiceTest.java
  30. +0 −86 opennms-webapp/src/test/java/org/opennms/web/svclayer/DefaultPollServiceIntegrationIT.java
  31. +0 −244 opennms-webapp/src/test/java/org/opennms/web/svclayer/DemandPollServiceTest.java
  32. +0 −25 src/test/resources/test-data.sql
  33. +0 −14 tests/mock-elements/src/main/java/org/opennms/netmgt/mock/MockEventUtil.java
  34. +0 −10 tests/mock-elements/src/main/java/org/opennms/netmgt/mock/MockService.java
@@ -266,7 +266,6 @@
<feature>opennms-javamail</feature>
<feature>opennms-kafka-producer</feature>
<feature>opennms-model</feature>
<feature>opennms-poller-api</feature>
<feature>opennms-poller-shell</feature>
<feature>opennms-provisioning</feature>
<feature>opennms-provisioning-detectors</feature>
@@ -65,4 +65,28 @@
</rollback>
</changeSet>
<changeSet author="mvrueden" id="23.0.0-remove-pollresults-table">
<dropTable tableName="pollresults"></dropTable>
</changeSet>
<changeSet author="mvrueden" id="23.0.0-remove-pollresults-requence">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="1">
SELECT COUNT(relname) AS SEQUENCE_NAME FROM pg_class, pg_namespace
WHERE relkind='S' AND pg_class.relnamespace = pg_namespace.oid AND relname ILIKE 'pollresultnxtid'
</sqlCheck>
</preConditions>
<dropSequence sequenceName="pollresultnxtid" />
</changeSet>
<changeSet author="mvrueden" id="23.0.0-remove-demandpoll-table">
<dropTable tableName="demandpolls"></dropTable>
</changeSet>
<changeSet author="mvrueden" id="23.0.0-remove-demandpoll-requence">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="1">
SELECT COUNT(relname) AS SEQUENCE_NAME FROM pg_class, pg_namespace
WHERE relkind='S' AND pg_class.relnamespace = pg_namespace.oid AND relname ILIKE 'demandpollnxtid'
</sqlCheck>
</preConditions>
<dropSequence sequenceName="demandpollnxtid" />
</changeSet>
</databaseChangeLog>
@@ -10,8 +10,6 @@
--CREATE SEQUENCE VULNNXTID START WITH 2;
--CREATE SEQUENCE CATNXTID START WITH 2;
--CREATE SEQUENCE USERNOTIFNXTID START WITH 2;
--CREATE SEQUENCE DEMANDPOLLNXTID START WITH 2;
--CREATE SEQUENCE POLLRESULTNXTID START WITH 2;
--CREATE SEQUENCE MAPNXTID START WITH 2;
--CREATE SEQUENCE REPORTNXTID START WITH 2;
--CREATE SEQUENCE REPORTCATALOGNXTID START WITH 2;
@@ -50,8 +50,6 @@ drop table vulnPlugins cascade;
drop table serverMap cascade;
drop table serviceMap cascade;
drop table pathOutage cascade;
drop table demandPolls cascade;
drop table pollResults cascade;
drop table reportLocator cascade;
drop category_statusdef cascade;
drop statusview_statusdef cascade;
@@ -1132,65 +1130,6 @@ create index pathoutage_nodeid_idx on pathOutage(nodeID);
create index pathoutage_criticalpathip on pathOutage(criticalPathIp);
create index pathoutage_criticalpathservicename_idx on pathOutage(criticalPathServiceName);
--########################################################################
--# demandPolls Table - contains a list of requested polls
--#
--# This table contains the following information:
--#
--# id : Unique identifier of the demand poll
--# requestTime : the time the user requested the poll
--# user : the user that requested the poll
--# description : ?
--#
--########################################################################
create table demandPolls (
id integer,
requestTime timestamp without time zone,
username varchar(32),
description varchar(128),
constraint demandpoll_pkey primary key (id)
);
create index demandpoll_request_time on demandPolls(requestTime);
--########################################################################
--# pollResults Table - contains a list of requested polls
--#
--# This table contains the following information:
--#
--# id : unique identifier of the demand poll
--# pollId : unique identifier of this specific service poll
--# nodeId : node id of the polled service
--# ipAddr : ip address of the polled service
--# ifIndex : ifIndex of the polled service's interface
--# serviceId : serviceid of the polled service
--# statusCode : status code of the pollstatus returned by the monitor
--# statusName : status name of the pollstaus returnd by the monitor
--# reason : the reason of the pollstatus returned by the monitor
--#
--########################################################################
create table pollResults (
id integer,
pollId integer,
nodeId integer,
ipAddr varchar(16),
ifIndex integer,
serviceId integer,
statusCode integer,
statusName varchar(32),
reason varchar(128),
constraint pollresult_pkey primary key (id),
constraint fk_demandPollId foreign key (pollID) references demandPolls (id) ON DELETE CASCADE
);
create index pollresults_poll_id on pollResults(pollId);
create index pollresults_service on pollResults(nodeId, ipAddr, ifIndex, serviceId);
--##################################################################
--# The following commands set up automatic sequencing functionality
--# for fields which require this.
@@ -1131,17 +1131,6 @@
<alarm-data reduction-key="%uei%:%dpname%:%nodeid%:%interface%:%service%" alarm-type="3" auto-clean="false" />
-->
</event>
<event>
<uei>uei.opennms.org/internal/demandPollService</uei>
<event-label>OpenNMS-defined node event: DemandPoll</event-label>
<descr>
&lt;p&gt;The Demand Poll requested on %nodeid% (%nodelabel%)
</descr>
<logmsg dest='logndisplay'>
&lt;p&gt;The Demand Poll requested on %nodeid% (%nodelabel%).&lt;/p&gt;
</logmsg>
<severity>Normal</severity>
</event>
<!-- Remote Poller Events -->
<event>
<uei>uei.opennms.org/remote/nodes/nodeLostService</uei>
@@ -344,11 +344,6 @@
*/
public static final String NOTIFICATION_WITHOUT_USERS = "uei.opennms.org/internal/notificationWithoutUsers";
/**
* Demand poll service event ui.
*/
public static final String DEMAND_POLL_SERVICE_EVENT_UEI = "uei.opennms.org/internal/demandPollService";
/**
* An event to signal that a user has changed asset information via the web
* UI.
@@ -531,12 +526,6 @@
*/
public static final String PARM_CRITICAL_PATH_NOTICE_SUPRESSED = "noticeSupressed";
/**
* This parameter is set to indicate the id of the demandPoll object to store the results
* of a demandPoll in.
*/
public static final String PARM_DEMAND_POLL_ID = "demandPollId";
/**
* The nodeSysName from the node table when sent as an event parm.
*/
@@ -59,8 +59,6 @@ drop table monitoringsystems cascade;
drop table events cascade;
drop table event_parameters cascade;
drop table pathOutage cascade;
drop table demandPolls cascade;
drop table pollResults cascade;
drop table reportLocator cascade;
drop table atinterface cascade;
drop table stpnode cascade;
@@ -95,8 +93,6 @@ drop sequence memoNxtId;
drop sequence outageNxtId;
drop sequence notifyNxtId;
drop sequence userNotifNxtId;
drop sequence demandPollNxtId;
drop sequence pollResultNxtId;
drop sequence reportNxtId;
drop sequence reportCatalogNxtId;
drop sequence mapNxtId;
@@ -190,16 +186,6 @@ create sequence catNxtId minvalue 1;
--# install: userNotifNxtId id usersNotified
create sequence userNotifNxtId minvalue 1;
--# Sequence for the id column in the demandPolls table
--# sequence, column, table
--# install: demandPollNxtId id demandPolls
create sequence demandPollNxtId minvalue 1;
--# Sequence for the id column in the pollResults table
--# sequence, column, table
--# install: pollResultNxtId id pollResults
create sequence pollResultNxtId minvalue 1;
--# Sequence for the mapID column in the map table
--# sequence, column, table
--# install: mapNxtId mapid map
@@ -1379,65 +1365,7 @@ create table pathOutage (
create unique index pathoutage_nodeid on pathOutage(nodeID);
create index pathoutage_criticalpathip on pathOutage(criticalPathIp);
create index pathoutage_criticalpathservicename_idx on pathOutage(criticalPathServiceName);
--########################################################################
--# demandPolls Table - contains a list of requested polls
--#
--# This table contains the following information:
--#
--# id : Unique identifier of the demand poll
--# requestTime : the time the user requested the poll
--# user : the user that requested the poll
--# description : ?
--#
--########################################################################
create table demandPolls (
id integer,
requestTime timestamp with time zone,
username varchar(32),
description varchar(128),
constraint demandpoll_pkey primary key (id)
);
create index demandpoll_request_time on demandPolls(requestTime);
--########################################################################
--# pollResults Table - contains a list of requested polls
--#
--# This table contains the following information:
--#
--# id : unique identifier of the demand poll
--# pollId : unique identifier of this specific service poll
--# nodeId : node id of the polled service
--# ipAddr : ip address of the polled service
--# ifIndex : ifIndex of the polled service's interface
--# serviceId : serviceid of the polled service
--# statusCode : status code of the pollstatus returned by the monitor
--# statusName : status name of the pollstaus returnd by the monitor
--# reason : the reason of the pollstatus returned by the monitor
--#
--########################################################################
create table pollResults (
id integer,
pollId integer,
nodeId integer,
ipAddr text,
ifIndex integer,
serviceId integer,
statusCode integer,
statusName varchar(32),
reason varchar(128),
constraint pollresult_pkey primary key (id),
constraint fk_demandPollId foreign key (pollID) references demandPolls (id) ON DELETE CASCADE
);
create index pollresults_poll_id on pollResults(pollId);
create index pollresults_service on pollResults(nodeId, ipAddr, ifIndex, serviceId);
--#############################################################################
--# location_specific_status_changes Table - contains a list status
--# changed reported for a service by a monitor in a remote
@@ -109,15 +109,6 @@
</logmsg>
<severity>Warning</severity>
</event>
<event>
<uei>uei.opennms.org/internal/demandPollService</uei>
<event-label>OpenNMS-defined node event: DemandPoll</event-label>
<descr>&lt;p>The Demand Poll requested on %nodeid% (%nodelabel%)</descr>
<logmsg dest="logndisplay">
&lt;p>The Demand Poll requested on %nodeid% (%nodelabel%).&lt;/p>
</logmsg>
<severity>Normal</severity>
</event>
<event>
<uei>uei.opennms.org/internal/schedOutagesChanged</uei>
<event-label>OpenNMS-defined internal event: scehduled outage configuration changed</event-label>
@@ -1136,17 +1136,6 @@
<alarm-data reduction-key="%uei%:%dpname%:%nodeid%:%interface%:%service%" alarm-type="3" auto-clean="false" />
-->
</event>
<event>
<uei>uei.opennms.org/internal/demandPollService</uei>
<event-label>OpenNMS-defined node event: DemandPoll</event-label>
<descr>
&lt;p&gt;The Demand Poll requested on %nodeid% (%nodelabel%)
</descr>
<logmsg dest='logndisplay'>
&lt;p&gt;The Demand Poll requested on %nodeid% (%nodelabel%).&lt;/p&gt;
</logmsg>
<severity>Normal</severity>
</event>
<event>
<mask>
<maskelement>
@@ -1129,17 +1129,6 @@
<alarm-data reduction-key="%uei%:%dpname%:%nodeid%:%interface%:%service%" alarm-type="3" auto-clean="false" />
-->
</event>
<event>
<uei>uei.opennms.org/internal/demandPollService</uei>
<event-label>OpenNMS-defined node event: DemandPoll</event-label>
<descr>
&lt;p&gt;The Demand Poll requested on %nodeid% (%nodelabel%)
</descr>
<logmsg dest='logndisplay'>
&lt;p&gt;The Demand Poll requested on %nodeid% (%nodelabel%).&lt;/p&gt;
</logmsg>
<severity>Normal</severity>
</event>
<!-- Remote Poller Events -->
<event>
<uei>uei.opennms.org/remote/nodes/nodeLostService</uei>
@@ -1147,17 +1147,6 @@
<alarm-data reduction-key="%uei%:%dpname%:%nodeid%:%interface%:%service%" alarm-type="3" auto-clean="false" />
-->
</event>
<event>
<uei>uei.opennms.org/internal/demandPollService</uei>
<event-label>OpenNMS-defined node event: DemandPoll</event-label>
<descr>
&lt;p&gt;The Demand Poll requested on %nodeid% (%nodelabel%)
</descr>
<logmsg dest='logndisplay'>
&lt;p&gt;The Demand Poll requested on %nodeid% (%nodelabel%).&lt;/p&gt;
</logmsg>
<severity>Normal</severity>
</event>
<!-- Remote Poller Events -->
<event>
<uei>uei.opennms.org/remote/nodes/nodeLostService</uei>

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 4d49675

Please sign in to comment.