-
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
Adds virtual totals for servers, vms and hosts to Physical Infrastructure Providers #15613
Conversation
@miq-bot remove_label wip |
@miq-bot assign @blomquisg |
physical_servers.inject(0) { |t, physical_server| physical_server.host.nil? ? t : t + 1 } | ||
end | ||
|
||
def total_hosts; count_physical_servers_with_host; end |
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 can just be a method alias, I think:
alias_method :total_hosts, :count_physical_servers_with_host
Same for total_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.
Implemented this as
alias :total_hosts :count_physical_servers_with_host
Checked commits https://github.com/lenovo/manageiq/compare/fbf4e2d0ff90608b06d2e52650f33c9caa071f50~...d78329b426690cca4ab126d5e60db5347eb9fb4e with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
This data will enable additional detail in the UI and via the REST API for determining how many physical servers, hosts and virtual machines are being managed by a particular provider. The relationships between these resources is already maintained.
Overrides the total_hosts, total_vms attributes of ExtManagementSystem and adds the attribute total_physical_servers.
@miq-bot add_label enhancement, wip