[GitHub] cloudstack pull request: GetUsageRecordsCmd - NewInputFormat for S...

2015-04-21 Thread svscorp
GitHub user svscorp opened a pull request:

https://github.com/apache/cloudstack/pull/185

GetUsageRecordsCmd - NewInputFormat for START_DATE and END_DATE

It is extremely useful to be able to narrow the output to the specific time 
range within a date.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/svscorp/cloudstack 
GetUsageRecords-NewInputFormat-StartDate-EndDate

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/185.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #185


commit a0c6b4c54c6dc788a417455b5e649dc81038ac83
Author: Ilia Shakitko 
Date:   2015-04-21T13:43:25Z

GetUsageRecordsCmd - NewInputFormat for START_DATE and END_DATE (with time; 
backward capabile)




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: GetUsageRecordsCmd - NewInputFormat for S...

2015-04-23 Thread svscorp
Github user svscorp commented on the pull request:

https://github.com/apache/cloudstack/pull/185#issuecomment-95592190
  
After making more tests, there is one more commit added to remove 
unnecessary adjustToDayStart/End code, since ParamProcessWorker is actually 
taking care of building proper date in new format.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: GetUsageRecordsCmd - NewInputFormat for S...

2015-04-24 Thread svscorp
Github user svscorp commented on the pull request:

https://github.com/apache/cloudstack/pull/185#issuecomment-95872015
  
@bhaisaab Oh yes, it would be perfect. Should I make a PR, Rohit?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Get usage records new input format start ...

2015-04-24 Thread svscorp
GitHub user svscorp opened a pull request:

https://github.com/apache/cloudstack/pull/191

Get usage records new input format start date end date (for 4.5 branch)

Port of an improvement from PR: #185 

@bhaisaab @kishankavala Here it is.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/svscorp/cloudstack 
GetUsageRecords-NewInputFormat-StartDate-EndDate-4.5

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/191.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #191


commit e387e316a2a21a535dab36fe7e7a69f76bd0fb81
Author: Ilia Shakitko 
Date:   2015-04-21T13:43:25Z

GetUsageRecordsCmd - NewInputFormat for START_DATE and END_DATE (with time; 
backward capabile)

commit 91cdde7f0ac03ee581590edc481ee61413900fd9
Author: Ilia Shakitko 
Date:   2015-04-24T21:49:27Z

GetUsageRecordsCmd - NewInputFormat for START_DATE and END_DATE (with time; 
backward capabile)




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Get usage records new input format start ...

2015-04-24 Thread svscorp
Github user svscorp commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/191#discussion_r29093521
  
--- Diff: server/src/com/cloud/usage/UsageServiceImpl.java ---
@@ -224,11 +224,11 @@ public boolean 
generateUsageRecords(GenerateUsageRecordsCmd cmd) {
 throw new InvalidParameterValueException("Incorrect Date 
Range. Start date: " + startDate + " is after end date:" + endDate);
 }
 TimeZone usageTZ = getUsageTimezone();
-Date adjustedStartDate = computeAdjustedTime(startDate, usageTZ, 
true);
-Date adjustedEndDate = computeAdjustedTime(endDate, usageTZ, 
false);
+Date adjustedStartDate = computeAdjustedTime(startDate, usageTZ);
+Date adjustedEndDate = computeAdjustedTime(endDate, usageTZ);
 
 if (s_logger.isDebugEnabled()) {
-s_logger.debug("getting usage records for account: " + 
accountId + ", domainId: " + domainId + ", between " + startDate + " and " + 
endDate +
+s_logger.debug("getting usage records for account: " + 
accountId + ", domainId: " + domainId + ", between " + djustedStartDate + " and 
" + adjustedEndDate +
--- End diff --

Yes, already done. Bad typo.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Get usage records new input format start ...

2015-04-25 Thread svscorp
Github user svscorp closed the pull request at:

https://github.com/apache/cloudstack/pull/191


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Get usage records new input format start ...

2015-04-25 Thread svscorp
Github user svscorp commented on the pull request:

https://github.com/apache/cloudstack/pull/191#issuecomment-96160523
  
Thanks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---