Re: Review Request 11649: CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period is required.

2013-07-10 Thread Sanjay Tripathi

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11649/
---

(Updated July 10, 2013, 5:50 p.m.)


Review request for cloudstack and Devdeep Singh.


Changes
---

Resolved conflicts with the latest master code.


Bugs: CLOUDSTACK-1768


Repository: cloudstack-git


Description
---

CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period 
is required.

Under this improvement, archive/deletion of alerts and events by time period 
i.e. with startdate and enddate is required.

Removed parameter "olderthan" and added new params "startdate" and "enddate" in 
the following APIs:
archiveEvents
deleteEvents
archiveAlerts
deleteAlerts


Diffs (updated)
-

  api/src/org/apache/cloudstack/api/ApiConstants.java e2857b8 
  
api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java 
2a1a47a 
  api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java 
f03793c 
  api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java 
481607c 
  api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java 
a03e6d9 
  engine/schema/src/com/cloud/alert/dao/AlertDao.java fda814d 
  engine/schema/src/com/cloud/alert/dao/AlertDaoImpl.java 18115a5 
  engine/schema/src/com/cloud/event/dao/EventDao.java 9454ce7 
  engine/schema/src/com/cloud/event/dao/EventDaoImpl.java cefe107 
  server/src/com/cloud/api/ApiDispatcher.java b7d08e2 
  server/src/com/cloud/server/ManagementServerImpl.java da9d6a2 
  server/test/com/cloud/alert/AlertControlsUnitTest.java c1e4c54 
  server/test/com/cloud/event/EventControlsUnitTest.java e2a86cd 

Diff: https://reviews.apache.org/r/11649/diff/


Testing
---

Tested and verified the result of all the four APIs with the different 
combinations and inputs of startdate and enddate in my local CloudStack setup.


Thanks,

Sanjay Tripathi



Re: Review Request 11649: CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period is required.

2013-07-10 Thread Devdeep Singh

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11649/#review23000
---



api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java


This check looks incorrect. If start date isn't given and enddate is given 
it should work like a older than field. All alerts/events older than end date 
should get deleted/archived. startdate shouldn't be in the first check.



engine/schema/src/com/cloud/alert/dao/AlertDaoImpl.java


Archiving based on only startDate is incorrect. It should be either between 
start and end date or archiving alerts older than end date.



engine/schema/src/com/cloud/alert/dao/AlertDaoImpl.java


Same as above. start date should be removed (it will never get here)



engine/schema/src/com/cloud/event/dao/EventDaoImpl.java


Same as above


- Devdeep Singh


On July 10, 2013, 5:50 p.m., Sanjay Tripathi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11649/
> ---
> 
> (Updated July 10, 2013, 5:50 p.m.)
> 
> 
> Review request for cloudstack and Devdeep Singh.
> 
> 
> Bugs: CLOUDSTACK-1768
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> ---
> 
> CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period 
> is required.
> 
> Under this improvement, archive/deletion of alerts and events by time period 
> i.e. with startdate and enddate is required.
> 
> Removed parameter "olderthan" and added new params "startdate" and "enddate" 
> in the following APIs:
> archiveEvents
> deleteEvents
> archiveAlerts
> deleteAlerts
> 
> 
> Diffs
> -
> 
>   api/src/org/apache/cloudstack/api/ApiConstants.java e2857b8 
>   
> api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java
>  2a1a47a 
>   
> api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java 
> f03793c 
>   api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java 
> 481607c 
>   api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java 
> a03e6d9 
>   engine/schema/src/com/cloud/alert/dao/AlertDao.java fda814d 
>   engine/schema/src/com/cloud/alert/dao/AlertDaoImpl.java 18115a5 
>   engine/schema/src/com/cloud/event/dao/EventDao.java 9454ce7 
>   engine/schema/src/com/cloud/event/dao/EventDaoImpl.java cefe107 
>   server/src/com/cloud/api/ApiDispatcher.java b7d08e2 
>   server/src/com/cloud/server/ManagementServerImpl.java da9d6a2 
>   server/test/com/cloud/alert/AlertControlsUnitTest.java c1e4c54 
>   server/test/com/cloud/event/EventControlsUnitTest.java e2a86cd 
> 
> Diff: https://reviews.apache.org/r/11649/diff/
> 
> 
> Testing
> ---
> 
> Tested and verified the result of all the four APIs with the different 
> combinations and inputs of startdate and enddate in my local CloudStack setup.
> 
> 
> Thanks,
> 
> Sanjay Tripathi
> 
>



Re: Review Request 11649: CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period is required.

2013-07-11 Thread Sanjay Tripathi

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11649/
---

(Updated July 11, 2013, 7:59 a.m.)


Review request for cloudstack and Devdeep Singh.


Changes
---

Incorporated all the review comments, please commit it if the patch looks fine.


Bugs: CLOUDSTACK-1768


Repository: cloudstack-git


Description
---

CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period 
is required.

Under this improvement, archive/deletion of alerts and events by time period 
i.e. with startdate and enddate is required.

Removed parameter "olderthan" and added new params "startdate" and "enddate" in 
the following APIs:
archiveEvents
deleteEvents
archiveAlerts
deleteAlerts


Diffs (updated)
-

  api/src/org/apache/cloudstack/api/ApiConstants.java e2857b8 
  
api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java 
2a1a47a 
  api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java 
f03793c 
  api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java 
481607c 
  api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java 
a03e6d9 
  engine/schema/src/com/cloud/alert/dao/AlertDao.java fda814d 
  engine/schema/src/com/cloud/alert/dao/AlertDaoImpl.java 18115a5 
  engine/schema/src/com/cloud/event/dao/EventDao.java 9454ce7 
  engine/schema/src/com/cloud/event/dao/EventDaoImpl.java cefe107 
  server/src/com/cloud/api/ApiDispatcher.java b7d08e2 
  server/src/com/cloud/server/ManagementServerImpl.java da9d6a2 
  server/test/com/cloud/alert/AlertControlsUnitTest.java c1e4c54 
  server/test/com/cloud/event/EventControlsUnitTest.java e2a86cd 

Diff: https://reviews.apache.org/r/11649/diff/


Testing
---

Tested and verified the result of all the four APIs with the different 
combinations and inputs of startdate and enddate in my local CloudStack setup.


Thanks,

Sanjay Tripathi



Re: Review Request 11649: CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period is required.

2013-07-11 Thread ASF Subversion and Git Services

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11649/#review23003
---


Commit 429e6bd4bb084a568c74d5412729e5e8c09d4c9a in branch refs/heads/master 
from Sanjay Tripathi
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=429e6bd ]

CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period 
is required.
User should be able to delete/archive alerts and events by selecting a time 
period or by
choosing the alerts and events older than a date. Added the ability to choose a 
time period
too.


- ASF Subversion and Git Services


On July 11, 2013, 7:59 a.m., Sanjay Tripathi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11649/
> ---
> 
> (Updated July 11, 2013, 7:59 a.m.)
> 
> 
> Review request for cloudstack and Devdeep Singh.
> 
> 
> Bugs: CLOUDSTACK-1768
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> ---
> 
> CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period 
> is required.
> 
> Under this improvement, archive/deletion of alerts and events by time period 
> i.e. with startdate and enddate is required.
> 
> Removed parameter "olderthan" and added new params "startdate" and "enddate" 
> in the following APIs:
> archiveEvents
> deleteEvents
> archiveAlerts
> deleteAlerts
> 
> 
> Diffs
> -
> 
>   api/src/org/apache/cloudstack/api/ApiConstants.java e2857b8 
>   
> api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java
>  2a1a47a 
>   
> api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java 
> f03793c 
>   api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java 
> 481607c 
>   api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java 
> a03e6d9 
>   engine/schema/src/com/cloud/alert/dao/AlertDao.java fda814d 
>   engine/schema/src/com/cloud/alert/dao/AlertDaoImpl.java 18115a5 
>   engine/schema/src/com/cloud/event/dao/EventDao.java 9454ce7 
>   engine/schema/src/com/cloud/event/dao/EventDaoImpl.java cefe107 
>   server/src/com/cloud/api/ApiDispatcher.java b7d08e2 
>   server/src/com/cloud/server/ManagementServerImpl.java da9d6a2 
>   server/test/com/cloud/alert/AlertControlsUnitTest.java c1e4c54 
>   server/test/com/cloud/event/EventControlsUnitTest.java e2a86cd 
> 
> Diff: https://reviews.apache.org/r/11649/diff/
> 
> 
> Testing
> ---
> 
> Tested and verified the result of all the four APIs with the different 
> combinations and inputs of startdate and enddate in my local CloudStack setup.
> 
> 
> Thanks,
> 
> Sanjay Tripathi
> 
>



Re: Review Request 11649: CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period is required.

2013-07-11 Thread ASF Subversion and Git Services

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11649/#review23006
---


Commit 5dda98c3a00c6eca3dce76f0bd5627f230564844 in branch refs/heads/4.2 from 
Sanjay Tripathi
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=5dda98c ]

CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period 
is required.
User should be able to delete/archive alerts and events by selecting a time 
period or by
choosing the alerts and events older than a date. Added the ability to choose a 
time period
too.


- ASF Subversion and Git Services


On July 11, 2013, 7:59 a.m., Sanjay Tripathi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11649/
> ---
> 
> (Updated July 11, 2013, 7:59 a.m.)
> 
> 
> Review request for cloudstack and Devdeep Singh.
> 
> 
> Bugs: CLOUDSTACK-1768
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> ---
> 
> CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period 
> is required.
> 
> Under this improvement, archive/deletion of alerts and events by time period 
> i.e. with startdate and enddate is required.
> 
> Removed parameter "olderthan" and added new params "startdate" and "enddate" 
> in the following APIs:
> archiveEvents
> deleteEvents
> archiveAlerts
> deleteAlerts
> 
> 
> Diffs
> -
> 
>   api/src/org/apache/cloudstack/api/ApiConstants.java e2857b8 
>   
> api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java
>  2a1a47a 
>   
> api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java 
> f03793c 
>   api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java 
> 481607c 
>   api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java 
> a03e6d9 
>   engine/schema/src/com/cloud/alert/dao/AlertDao.java fda814d 
>   engine/schema/src/com/cloud/alert/dao/AlertDaoImpl.java 18115a5 
>   engine/schema/src/com/cloud/event/dao/EventDao.java 9454ce7 
>   engine/schema/src/com/cloud/event/dao/EventDaoImpl.java cefe107 
>   server/src/com/cloud/api/ApiDispatcher.java b7d08e2 
>   server/src/com/cloud/server/ManagementServerImpl.java da9d6a2 
>   server/test/com/cloud/alert/AlertControlsUnitTest.java c1e4c54 
>   server/test/com/cloud/event/EventControlsUnitTest.java e2a86cd 
> 
> Diff: https://reviews.apache.org/r/11649/diff/
> 
> 
> Testing
> ---
> 
> Tested and verified the result of all the four APIs with the different 
> combinations and inputs of startdate and enddate in my local CloudStack setup.
> 
> 
> Thanks,
> 
> Sanjay Tripathi
> 
>



Re: Review Request 11649: CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period is required.

2013-07-11 Thread Devdeep Singh

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11649/#review23007
---

Ship it!


Committed to master and 4.2

- Devdeep Singh


On July 11, 2013, 7:59 a.m., Sanjay Tripathi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11649/
> ---
> 
> (Updated July 11, 2013, 7:59 a.m.)
> 
> 
> Review request for cloudstack and Devdeep Singh.
> 
> 
> Bugs: CLOUDSTACK-1768
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> ---
> 
> CLOUDSTACK-1768: Ability to delete Events and Alerts: Delete by a time period 
> is required.
> 
> Under this improvement, archive/deletion of alerts and events by time period 
> i.e. with startdate and enddate is required.
> 
> Removed parameter "olderthan" and added new params "startdate" and "enddate" 
> in the following APIs:
> archiveEvents
> deleteEvents
> archiveAlerts
> deleteAlerts
> 
> 
> Diffs
> -
> 
>   api/src/org/apache/cloudstack/api/ApiConstants.java e2857b8 
>   
> api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java
>  2a1a47a 
>   
> api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java 
> f03793c 
>   api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java 
> 481607c 
>   api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java 
> a03e6d9 
>   engine/schema/src/com/cloud/alert/dao/AlertDao.java fda814d 
>   engine/schema/src/com/cloud/alert/dao/AlertDaoImpl.java 18115a5 
>   engine/schema/src/com/cloud/event/dao/EventDao.java 9454ce7 
>   engine/schema/src/com/cloud/event/dao/EventDaoImpl.java cefe107 
>   server/src/com/cloud/api/ApiDispatcher.java b7d08e2 
>   server/src/com/cloud/server/ManagementServerImpl.java da9d6a2 
>   server/test/com/cloud/alert/AlertControlsUnitTest.java c1e4c54 
>   server/test/com/cloud/event/EventControlsUnitTest.java e2a86cd 
> 
> Diff: https://reviews.apache.org/r/11649/diff/
> 
> 
> Testing
> ---
> 
> Tested and verified the result of all the four APIs with the different 
> combinations and inputs of startdate and enddate in my local CloudStack setup.
> 
> 
> Thanks,
> 
> Sanjay Tripathi
> 
>