Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charge only for past hours #13134

Merged
merged 6 commits into from
Jan 10, 2017
Merged

Charge only for past hours #13134

merged 6 commits into from
Jan 10, 2017

Conversation

isimluk
Copy link
Member

@isimluk isimluk commented Dec 13, 2016

Description

https://bugzilla.redhat.com/show_bug.cgi?id=1402072

  • For variable rate, we charge only that much that has been consumed.
  • For fixed rate, we should charge also only that much that is consumed.

Imagine, You will terminate your service tomorrow, you should not be charged in advance.

@miq-bot add_label bug, chargeback
@miq-bot assign @gtanzillo

@isimluk isimluk force-pushed the rhbz#1402072 branch 2 times, most recently from 9347446 to 96c99de Compare December 13, 2016 21:42
@chessbyte chessbyte added the wip label Dec 14, 2016
@miq-bot
Copy link
Member

miq-bot commented Dec 19, 2016

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

@isimluk
Copy link
Member Author

isimluk commented Jan 4, 2017

Uff. This is gonna be one of the more expensive rebases. People were trying to approach the same problems in different prs, but did not fixed the root cause. Gosh.

@isimluk isimluk force-pushed the rhbz#1402072 branch 2 times, most recently from 75d73ca to 1716f8d Compare January 5, 2017 10:34
@isimluk isimluk changed the title [WIP] Fixed rate should charge only for past hours Fixed rate should charge only for past hours Jan 5, 2017
@isimluk
Copy link
Member Author

isimluk commented Jan 5, 2017

@miq-bot remove_label wip

@miq-bot miq-bot removed the wip label Jan 5, 2017
After spending 15 minutes of head scratching.
and fix related rubocop
Otherwise, nobody will ever understand why we have them.

Now each file includes single hardcoded datetime and everything else is
relative to it. Think about it. That's actually meaning of the specs
prescription. The hardcoded values were hardcoded to be relative to
other hc values.
For variable_rate, we charge only that much that has been consumed.

Perhaps I'll end the service tmrw, I should not be charged in advanced.

https://bugzilla.redhat.com/show_bug.cgi?id=1402072
@isimluk isimluk changed the title Fixed rate should charge only for past hours Charge only for past hours Jan 6, 2017
@miq-bot
Copy link
Member

miq-bot commented Jan 6, 2017

Checked commits isimluk/manageiq@2270d42~...3a678bb with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
7 files checked, 0 offenses detected
Everything looks good. 👍

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@gtanzillo gtanzillo added this to the Sprint 52 Ending Jan 16, 2017 milestone Jan 10, 2017
@gtanzillo gtanzillo merged commit db8bb44 into ManageIQ:master Jan 10, 2017
@simaishi
Copy link
Contributor

Added euwe/yes as per flag on the BZ.

@isimluk
Copy link
Member Author

isimluk commented Jan 11, 2017

Thanks! We just need to merge #13419 first.

Afterwards this will be easier to rebase. (I still expect conflicts in specs).

@simaishi
Copy link
Contributor

Backported to Euwe via #13554

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants