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 SCVMM's vm only until it is retired. #13451

Merged

Conversation

isimluk
Copy link
Member

@isimluk isimluk commented Jan 11, 2017

Since we don't collect metric for SCVMM, we need to explicitly stop charging once the resource is retired.

Unfortunately, we don't store archived_on date atm. So, we need to rely on retirement.

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

@isimluk isimluk force-pushed the chargebacks-without-rollups-till-retirement branch from b449896 to 41e9832 Compare January 11, 2017 16:29
When resource did not exist in given interval (day, week, month) we will
not yield Consumption object into the chargeback engine.

As a result the report won't contain rows with zero consumption.
@miq-bot
Copy link
Member

miq-bot commented Jan 11, 2017

Checked commits isimluk/manageiq@41e9832~...166896f with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
2 files checked, 1 offense detected

app/models/chargeback/consumption.rb

Nice catch @lpichler!
Copy link
Contributor

@lpichler lpichler left a comment

Choose a reason for hiding this comment

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

works great! 👍

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.

👍

@gtanzillo gtanzillo added this to the Sprint 52 Ending Jan 16, 2017 milestone Jan 16, 2017
@gtanzillo gtanzillo merged commit 1d90817 into ManageIQ:master Jan 16, 2017
@isimluk isimluk deleted the chargebacks-without-rollups-till-retirement branch January 17, 2017 08:25
@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.

5 participants