-
Notifications
You must be signed in to change notification settings - Fork 897
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
Chargeback without C & U #13884
Chargeback without C & U #13884
Conversation
e7dd808
to
5f9a15f
Compare
This pull request is not mergeable. Please rebase and repush. |
5f9a15f
to
2423168
Compare
This pull request is not mergeable. Please rebase and repush. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍 Will merge after conflicts are resolved.
2423168
to
06ac284
Compare
06ac284
to
fd4e5e8
Compare
per discussion with @gtanzillo I flip semantic in option for this feature, from conflicts resolved 👍 |
@options[:include_metrics] is on the report means nil - (default) include metrics rollups true - include metric rollups false - don't include metric rollups this covering methond include_metrics? which is returning false or true
when ReportOptions#include_metrics? is false
(without alignment of code)
fd4e5e8
to
939fd8f
Compare
Checked commits lpichler/manageiq@529bda8~...939fd8f with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 spec/models/chargeback_vm_spec.rb
|
# support hyper-v for which we do not collect metrics yet | ||
scope = ManageIQ::Providers::Microsoft::InfraManager::Vm | ||
# support hyper-v for which we do not collect metrics yet (also when we are including metrics in calculations) | ||
scope = @options.include_metrics? ? ManageIQ::Providers::Microsoft::InfraManager::Vm : vms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aside: we need to get this class reference out of here.
@options[:include_metrics]
on the report meansnil
- (default) include metrics rollupstrue
- include metric rollupsfalse
- don't include metric rollupsthis covering method
include_metrics?
which is returning only false or true
Avoid charging resources with metric rollups
when
options.include_metrics?
is falseI am sorry for commit
I separate testing chargeback by metric with/without rollups by
context
.I need to have clean setup for testing chargeback without any created VMs
So in the commit is just aligning code by 2 spaces after separation in commit
@miq-bot assign @gtanzillo
@miq-bot add_label chargeback, enhancement
please review @isimluk