Re: Review Request: CLOUDSTACK-874 Ability to delete Events and Alerts
On March 8, 2013, 6:53 p.m., Min Chen wrote: Ship It! commit f539f40e3505e80a60b75b3e98fbab269a0fbde3 Author: Sanjay Tripathi sanjay.tripa...@citrix.com Date: Wed Feb 27 11:39:58 2013 +0530 CLOUDSTACK-874: Ability to delete Events and Alerts This feature will provide the functionality to delete or archive the Alerts/Events. Delete or archive alerts APIs are available only for root-admin, delete or archive events are available for regular users. - Sanjay --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9753/#review17618 --- On March 7, 2013, 10:46 a.m., Sanjay Tripathi wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9753/ --- (Updated March 7, 2013, 10:46 a.m.) Review request for cloudstack, Devdeep Singh, Sateesh Chodapuneedi, and Min Chen. Description --- This feature will provide the functionality to delete or archive the Alerts/Events. Delete or archive alerts APIs are available only for root-admin, delete or archive events are available for regular users. Functional Spec:https://cwiki.apache.org/confluence/display/CLOUDSTACK/Ability+to+delete+or+archive+Events+and+Alerts This addresses bugs Ability, Alerts, CLOUDSTACK-874, Events, and, delete, and to. Diffs - api/src/com/cloud/alert/Alert.java 050f97f api/src/com/cloud/event/Event.java 1a61636 api/src/com/cloud/server/ManagementService.java 1736da3 api/src/org/apache/cloudstack/api/ApiConstants.java 1b544fd api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java PRE-CREATION client/tomcatconf/commands.properties.in dd0c3f8 core/src/com/cloud/alert/AlertVO.java f6089d6 core/src/com/cloud/event/EventVO.java ac46f24 core/src/com/cloud/event/dao/EventDao.java bfcb818 core/src/com/cloud/event/dao/EventDaoImpl.java 44fbb03 server/src/com/cloud/alert/dao/AlertDao.java eb1faa5 server/src/com/cloud/alert/dao/AlertDaoImpl.java 2f3be88 server/src/com/cloud/api/ApiDispatcher.java 764b3ae server/src/com/cloud/api/query/QueryManagerImpl.java 8d8663a server/src/com/cloud/api/query/vo/EventJoinVO.java f29a942 server/src/com/cloud/configuration/Config.java 418f97d server/src/com/cloud/server/ManagementServerImpl.java 3c615e1 server/test/com/cloud/alert/AlertControlsUnitTest.java PRE-CREATION server/test/com/cloud/event/EventControlsUnitTest.java PRE-CREATION setup/db/db/schema-410to420.sql f3112a1 Diff: https://reviews.apache.org/r/9753/diff/ Testing --- Tested the new API archiveAlerts, deleteAlerts, archiveEvents, deleteEvents with all the possible combinations of parameters as input on my local CloudStack setup. Thanks, Sanjay Tripathi
Re: Review Request: CLOUDSTACK-874 Ability to delete Events and Alerts
On March 6, 2013, 7:02 p.m., Min Chen wrote: server/src/com/cloud/api/query/QueryManagerImpl.java, line 434 https://reviews.apache.org/r/9753/diff/2/?file=267227#file267227line434 So with archive feature, previous listAlerts or listEvents will not show archived alerts or events anymore, right? That's right. On March 6, 2013, 7:02 p.m., Min Chen wrote: api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java, line 47 https://reviews.apache.org/r/9753/diff/2/?file=267215#file267215line47 If you are internally using uuids for these Ids passed in, you may not be able to handle some upgraded cases, where there is no UUIDs for those old Alerts/Events customers have created before we introduced UUID. Generally we internally use Long db id for these cases in our command, will convert over-the-wire UUID to internal ID based on annotation. Please confirm with Rohit about recommended way for this list of Id cases. Min, thanks for review. I have changed it from comparing UUIDs to IDs i.e. ListLong, so it will be fast while comparing and will work in case of db upgrade. - Sanjay --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9753/#review17480 --- On March 6, 2013, 6:16 p.m., Sanjay Tripathi wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9753/ --- (Updated March 6, 2013, 6:16 p.m.) Review request for cloudstack, Devdeep Singh, Sateesh Chodapuneedi, and Min Chen. Description --- This feature will provide the functionality to delete or archive the Alerts/Events. Delete or archive alerts APIs are available only for root-admin, delete or archive events are available for regular users. Functional Spec:https://cwiki.apache.org/confluence/display/CLOUDSTACK/Ability+to+delete+or+archive+Events+and+Alerts This addresses bugs Ability, Alerts, CLOUDSTACK-874, Events, and, delete, and to. Diffs - api/src/com/cloud/alert/Alert.java 050f97f api/src/com/cloud/event/Event.java 1a61636 api/src/com/cloud/server/ManagementService.java 1736da3 api/src/org/apache/cloudstack/api/ApiConstants.java 1b544fd api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java PRE-CREATION client/tomcatconf/commands.properties.in dd0c3f8 core/src/com/cloud/alert/AlertVO.java f6089d6 core/src/com/cloud/event/EventVO.java ac46f24 core/src/com/cloud/event/dao/EventDao.java bfcb818 core/src/com/cloud/event/dao/EventDaoImpl.java 44fbb03 server/src/com/cloud/alert/dao/AlertDao.java eb1faa5 server/src/com/cloud/alert/dao/AlertDaoImpl.java 2f3be88 server/src/com/cloud/api/ApiDispatcher.java 764b3ae server/src/com/cloud/api/query/QueryManagerImpl.java 8d8663a server/src/com/cloud/api/query/vo/EventJoinVO.java f29a942 server/src/com/cloud/configuration/Config.java 418f97d server/src/com/cloud/server/ManagementServerImpl.java 3c615e1 server/test/com/cloud/alert/AlertControlsUnitTest.java PRE-CREATION server/test/com/cloud/event/EventControlsUnitTest.java PRE-CREATION setup/db/db/schema-410to420.sql f3112a1 Diff: https://reviews.apache.org/r/9753/diff/ Testing --- Tested the new API archiveAlerts, deleteAlerts, archiveEvents, deleteEvents with all the possible combinations of parameters as input on my local CloudStack setup. Thanks, Sanjay Tripathi
Re: Review Request: CLOUDSTACK-874 Ability to delete Events and Alerts
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9753/ --- (Updated March 7, 2013, 10:46 a.m.) Review request for cloudstack, Devdeep Singh, Sateesh Chodapuneedi, and Min Chen. Changes --- Updated patch with changes as per review comments. Description --- This feature will provide the functionality to delete or archive the Alerts/Events. Delete or archive alerts APIs are available only for root-admin, delete or archive events are available for regular users. Functional Spec:https://cwiki.apache.org/confluence/display/CLOUDSTACK/Ability+to+delete+or+archive+Events+and+Alerts This addresses bugs Ability, Alerts, CLOUDSTACK-874, Events, and, delete, and to. Diffs (updated) - api/src/com/cloud/alert/Alert.java 050f97f api/src/com/cloud/event/Event.java 1a61636 api/src/com/cloud/server/ManagementService.java 1736da3 api/src/org/apache/cloudstack/api/ApiConstants.java 1b544fd api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java PRE-CREATION client/tomcatconf/commands.properties.in dd0c3f8 core/src/com/cloud/alert/AlertVO.java f6089d6 core/src/com/cloud/event/EventVO.java ac46f24 core/src/com/cloud/event/dao/EventDao.java bfcb818 core/src/com/cloud/event/dao/EventDaoImpl.java 44fbb03 server/src/com/cloud/alert/dao/AlertDao.java eb1faa5 server/src/com/cloud/alert/dao/AlertDaoImpl.java 2f3be88 server/src/com/cloud/api/ApiDispatcher.java 764b3ae server/src/com/cloud/api/query/QueryManagerImpl.java 8d8663a server/src/com/cloud/api/query/vo/EventJoinVO.java f29a942 server/src/com/cloud/configuration/Config.java 418f97d server/src/com/cloud/server/ManagementServerImpl.java 3c615e1 server/test/com/cloud/alert/AlertControlsUnitTest.java PRE-CREATION server/test/com/cloud/event/EventControlsUnitTest.java PRE-CREATION setup/db/db/schema-410to420.sql f3112a1 Diff: https://reviews.apache.org/r/9753/diff/ Testing --- Tested the new API archiveAlerts, deleteAlerts, archiveEvents, deleteEvents with all the possible combinations of parameters as input on my local CloudStack setup. Thanks, Sanjay Tripathi
Re: Review Request: CLOUDSTACK-874 Ability to delete Events and Alerts
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9753/ --- (Updated March 6, 2013, 6:16 p.m.) Review request for cloudstack, Devdeep Singh, Sateesh Chodapuneedi, and Min Chen. Changes --- Added unit tests and resolved conflicts with the latest code. Description --- This feature will provide the functionality to delete or archive the Alerts/Events. Delete or archive alerts APIs are available only for root-admin, delete or archive events are available for regular users. Functional Spec:https://cwiki.apache.org/confluence/display/CLOUDSTACK/Ability+to+delete+or+archive+Events+and+Alerts This addresses bugs Ability, Alerts, CLOUDSTACK-874, Events, and, delete, and to. Diffs (updated) - api/src/com/cloud/alert/Alert.java 050f97f api/src/com/cloud/event/Event.java 1a61636 api/src/com/cloud/server/ManagementService.java 1736da3 api/src/org/apache/cloudstack/api/ApiConstants.java 1b544fd api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java PRE-CREATION client/tomcatconf/commands.properties.in dd0c3f8 core/src/com/cloud/alert/AlertVO.java f6089d6 core/src/com/cloud/event/EventVO.java ac46f24 core/src/com/cloud/event/dao/EventDao.java bfcb818 core/src/com/cloud/event/dao/EventDaoImpl.java 44fbb03 server/src/com/cloud/alert/dao/AlertDao.java eb1faa5 server/src/com/cloud/alert/dao/AlertDaoImpl.java 2f3be88 server/src/com/cloud/api/ApiDispatcher.java 764b3ae server/src/com/cloud/api/query/QueryManagerImpl.java 8d8663a server/src/com/cloud/api/query/vo/EventJoinVO.java f29a942 server/src/com/cloud/configuration/Config.java 418f97d server/src/com/cloud/server/ManagementServerImpl.java 3c615e1 server/test/com/cloud/alert/AlertControlsUnitTest.java PRE-CREATION server/test/com/cloud/event/EventControlsUnitTest.java PRE-CREATION setup/db/db/schema-410to420.sql f3112a1 Diff: https://reviews.apache.org/r/9753/diff/ Testing --- Tested the new API archiveAlerts, deleteAlerts, archiveEvents, deleteEvents with all the possible combinations of parameters as input on my local CloudStack setup. Thanks, Sanjay Tripathi
Re: Review Request: CLOUDSTACK-874 Ability to delete Events and Alerts
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9753/ --- (Updated March 5, 2013, 7:19 p.m.) Review request for cloudstack, Devdeep Singh, Sateesh Chodapuneedi, and Min Chen. Description (updated) --- This feature will provide the functionality to delete or archive the Alerts/Events. Delete or archive alerts APIs are available only for root-admin, delete or archive events are available for regular users. Functional Spec:https://cwiki.apache.org/confluence/display/CLOUDSTACK/Ability+to+delete+or+archive+Events+and+Alerts This addresses bugs Ability, Alerts, CLOUDSTACK-874, Events, and, delete, and to. Diffs - api/src/com/cloud/alert/Alert.java 050f97f api/src/com/cloud/event/Event.java 1a61636 api/src/com/cloud/server/ManagementService.java 1736da3 api/src/org/apache/cloudstack/api/ApiConstants.java 1b544fd api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java PRE-CREATION client/tomcatconf/commands.properties.in 5b387bd core/src/com/cloud/alert/AlertVO.java f6089d6 core/src/com/cloud/event/EventVO.java ac46f24 core/src/com/cloud/event/dao/EventDao.java bfcb818 core/src/com/cloud/event/dao/EventDaoImpl.java 44fbb03 server/src/com/cloud/alert/dao/AlertDao.java eb1faa5 server/src/com/cloud/alert/dao/AlertDaoImpl.java 2f3be88 server/src/com/cloud/api/ApiDispatcher.java cf86afc server/src/com/cloud/api/query/QueryManagerImpl.java 746e8cb server/src/com/cloud/api/query/vo/EventJoinVO.java f29a942 server/src/com/cloud/configuration/Config.java 04ad640 server/src/com/cloud/server/ManagementServerImpl.java 0e53079 setup/db/db/schema-410to420.sql 6f68e12 Diff: https://reviews.apache.org/r/9753/diff/ Testing --- Tested the new API archiveAlerts, deleteAlerts, archiveEvents, deleteEvents with all the possible combinations of parameters as input on my local CloudStack setup. Thanks, Sanjay Tripathi
RE: Review Request: CLOUDSTACK-874 Ability to delete Events and Alerts
Hello Sanjay Can you please let me know what happens during an upgrade? Specifically, wanted to confirm that the default setting of the global alert.purge.delay is set to do-not-delete, which is the current behavior? Also, is there an equivalent global/setting for events? Hari -Original Message- From: Sanjay Tripathi [mailto:nore...@reviews.apache.org] On Behalf Of Sanjay Tripathi Sent: Tuesday, March 5, 2013 11:07 AM To: Sateesh Chodapuneedi; Min Chen; Devdeep Singh Cc: cloudstack; Sanjay Tripathi Subject: Review Request: CLOUDSTACK-874 Ability to delete Events and Alerts --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9753/ --- Review request for cloudstack, Devdeep Singh, Sateesh Chodapuneedi, and Min Chen. Description --- This feature will provide the functionality to delete or archive the Alerts/Events. Delete or archive alerts APIs are available only for root-admin, delete or archive events are available for regular users. Functional Spec:https://cwiki.apache.org/confluence/display/CLOUDSTACK/Feature+-+Ability+to+delete+Events+and+Alerts This addresses bugs Ability, Alerts, CLOUDSTACK-874, Events, and, delete, and to. Diffs - api/src/com/cloud/alert/Alert.java 050f97f api/src/com/cloud/event/Event.java 1a61636 api/src/com/cloud/server/ManagementService.java 1736da3 api/src/org/apache/cloudstack/api/ApiConstants.java 1b544fd api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java PRE-CREATION client/tomcatconf/commands.properties.in 5b387bd core/src/com/cloud/alert/AlertVO.java f6089d6 core/src/com/cloud/event/EventVO.java ac46f24 core/src/com/cloud/event/dao/EventDao.java bfcb818 core/src/com/cloud/event/dao/EventDaoImpl.java 44fbb03 server/src/com/cloud/alert/dao/AlertDao.java eb1faa5 server/src/com/cloud/alert/dao/AlertDaoImpl.java 2f3be88 server/src/com/cloud/api/ApiDispatcher.java cf86afc server/src/com/cloud/api/query/QueryManagerImpl.java 746e8cb server/src/com/cloud/api/query/vo/EventJoinVO.java f29a942 server/src/com/cloud/configuration/Config.java 04ad640 server/src/com/cloud/server/ManagementServerImpl.java 0e53079 setup/db/db/schema-410to420.sql 6f68e12 Diff: https://reviews.apache.org/r/9753/diff/ Testing --- Tested the new API archiveAlerts, deleteAlerts, archiveEvents, deleteEvents with all the possible combinations of parameters as input on my local CloudStack setup. Thanks, Sanjay Tripathi
RE: Review Request: CLOUDSTACK-874 Ability to delete Events and Alerts
Thanks - can you please update the FS with this info, in case you already haven’t? Hari -Original Message- From: Sanjay Tripathi Sent: Tuesday, March 5, 2013 9:17 PM To: Hari Kannan; cloudstack-dev@incubator.apache.org; Sateesh Chodapuneedi; Min Chen; Devdeep Singh Subject: RE: Review Request: CLOUDSTACK-874 Ability to delete Events and Alerts Hari, -Original Message- From: Hari Kannan Sent: Wednesday, March 06, 2013 1:15 AM To: cloudstack-dev@incubator.apache.org; Sanjay Tripathi; Sateesh Chodapuneedi; Min Chen; Devdeep Singh Subject: RE: Review Request: CLOUDSTACK-874 Ability to delete Events and Alerts Hello Sanjay Can you please let me know what happens during an upgrade? Specifically, wanted to confirm that the default setting of the global alert.purge.delay is set to do-not-delete, which is the current behavior? In case of upgrade, CS creates a new column archived of Boolean type in alert and event tables and fill the column with default value 0 i.e. false. Yes the default setting of global alert.purge.delay is set to do-no-delete. Also, is there an equivalent global/setting for events? We already have event.purge.delay as equivalent global setting for events, which is by default set to 15 days i.e events older than 15 days will be purged. Hari -Original Message- From: Sanjay Tripathi [mailto:nore...@reviews.apache.org] On Behalf Of Sanjay Tripathi Sent: Tuesday, March 5, 2013 11:07 AM To: Sateesh Chodapuneedi; Min Chen; Devdeep Singh Cc: cloudstack; Sanjay Tripathi Subject: Review Request: CLOUDSTACK-874 Ability to delete Events and Alerts --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9753/ --- Review request for cloudstack, Devdeep Singh, Sateesh Chodapuneedi, and Min Chen. Description --- This feature will provide the functionality to delete or archive the Alerts/Events. Delete or archive alerts APIs are available only for root-admin, delete or archive events are available for regular users. Functional Spec:https://cwiki.apache.org/confluence/display/CLOUDSTACK/Feature+- +Ability+to+delete+Events+and+Alerts This addresses bugs Ability, Alerts, CLOUDSTACK-874, Events, and, delete, and to. Diffs - api/src/com/cloud/alert/Alert.java 050f97f api/src/com/cloud/event/Event.java 1a61636 api/src/com/cloud/server/ManagementService.java 1736da3 api/src/org/apache/cloudstack/api/ApiConstants.java 1b544fd api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlerts Cmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlerts Cmd.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCm d.java PRE-CREATION api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd .java PRE-CREATION client/tomcatconf/commands.properties.in 5b387bd core/src/com/cloud/alert/AlertVO.java f6089d6 core/src/com/cloud/event/EventVO.java ac46f24 core/src/com/cloud/event/dao/EventDao.java bfcb818 core/src/com/cloud/event/dao/EventDaoImpl.java 44fbb03 server/src/com/cloud/alert/dao/AlertDao.java eb1faa5 server/src/com/cloud/alert/dao/AlertDaoImpl.java 2f3be88 server/src/com/cloud/api/ApiDispatcher.java cf86afc server/src/com/cloud/api/query/QueryManagerImpl.java 746e8cb server/src/com/cloud/api/query/vo/EventJoinVO.java f29a942 server/src/com/cloud/configuration/Config.java 04ad640 server/src/com/cloud/server/ManagementServerImpl.java 0e53079 setup/db/db/schema-410to420.sql 6f68e12 Diff: https://reviews.apache.org/r/9753/diff/ Testing --- Tested the new API archiveAlerts, deleteAlerts, archiveEvents, deleteEvents with all the possible combinations of parameters as input on my local CloudStack setup. Thanks, Sanjay Tripathi