-
Notifications
You must be signed in to change notification settings - Fork 896
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
add quick_stats support for RHEVM host #10505
Conversation
6d63406
to
48fd252
Compare
This change: https://bugzilla.redhat.com/show_bug.cgi?id=1331388 should be reverted before this will have any effect. |
@masayag can you please review? |
e528d51
to
791aed9
Compare
looks good to me |
@blomquisg, can this be merged? |
def host_quick_stats(host) | ||
qs = {} | ||
with_provider_connection(:version => 4) do |connection| | ||
l = connection.system_service.hosts_service.host_service(host.uid_ems) |
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.
@borod108 I think it's likely that the meaning of l
is going to get lost. Can you change this to stats_list
, or something similar?
Also, below, the l
almost looks like the numeral 1
, and I was hugely confused as to what 1.detect
meant. 😄
@borod108 nice use of the Support Feature Mixin. Thanks for refactoring the hard coded |
@borod108 just assign back to me when you've addressed my nitpick comments 😄 |
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
791aed9
to
fd6698b
Compare
this is rebased over #11418 |
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
fd6698b
to
32f1aab
Compare
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
1 similar comment
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
32f1aab
to
1d2df6b
Compare
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
1d2df6b
to
1900a4c
Compare
@@ -66,4 +66,8 @@ def reserve_next_available_vnc_port | |||
port | |||
end | |||
end | |||
|
|||
def supports_quick_stats? |
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.
could you change this
e4f91a1
to
502d80a
Compare
@@ -211,7 +211,7 @@ def api3_supported_features | |||
end | |||
|
|||
def api4_supported_features | |||
[:snapshots] | |||
[:snapshots, :quick_stats] |
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.
Let's keep this list sorted, perhaps even have a single feature per line
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.
done
502d80a
to
6789f44
Compare
<github_pr_commenter_batch />Some comments on commit borod108@6789f44 spec/models/manageiq/providers/redhat/infra_manager/host_spec.rb
|
Checked commit borod108@6789f44 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1 |
@miq-bot add-label euwe/yes |
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.
This isn't really related to your PR but do we actually use |
The VMware part looks good, |
@blomquisg this is a small and non risky one, as far as I see. what do you think? |
@miq-bot assign blomquisg @blomquisg please merge and have a quick look at the last 2 comments about |
I'll merge it to master and let @chessbyte make the call on whether this gets backported to Euwe. |
@miq-bot add_label blocker |
add quick_stats support for RHEVM host (cherry picked from commit e44dbd2) https://bugzilla.redhat.com/show_bug.cgi?id=1392572
Euwe Backport details: $ git log -1
commit 27afd0f94632d9042a797fe6fb3c78b7c8a44cae
Author: Greg Blomquist <blomquisg@gmail.com>
Date: Wed Nov 2 17:44:05 2016 -0400
Merge pull request #10505 from borod108/rfe/rhevm_quick_stats
add quick_stats support for RHEVM host
(cherry picked from commit e44dbd2693a4cd2a19a5aa3a87c05d6320ce9f4a)
https://bugzilla.redhat.com/show_bug.cgi?id=1392572 |
Add host quickStats support for RHEVM providers so the auto provisioning of a VM will consider which host has more free memory when deciding on a host for the new VM.
(Until now this was only supported for VMWare)
see: https://bugzilla.redhat.com/show_bug.cgi?id=1323145