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

Adds virtual totals for servers, vms and hosts to Physical Infrastructure Providers #15613

Merged
merged 3 commits into from
Jul 27, 2017
Merged

Adds virtual totals for servers, vms and hosts to Physical Infrastructure Providers #15613

merged 3 commits into from
Jul 27, 2017

Conversation

rodneyhbrown7
Copy link

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

@miq-bot miq-bot changed the title Adds virtual totals for servers, vms and hosts [WIP] Adds virtual totals for servers, vms and hosts Jul 19, 2017
@rodneyhbrown7 rodneyhbrown7 changed the title [WIP] Adds virtual totals for servers, vms and hosts [WIP] Adds virtual totals for servers, vms and hosts to Physical Infrastructure Providers Jul 19, 2017
@rodneyhbrown7
Copy link
Author

@miq-bot remove_label wip

@miq-bot miq-bot changed the title [WIP] Adds virtual totals for servers, vms and hosts to Physical Infrastructure Providers Adds virtual totals for servers, vms and hosts to Physical Infrastructure Providers Jul 21, 2017
@miq-bot miq-bot removed the wip label Jul 21, 2017
@chessbyte chessbyte requested a review from juliancheal July 24, 2017 15:36
@bronaghs
Copy link

@miq-bot assign @blomquisg

@miq-bot miq-bot assigned blomquisg and unassigned bronaghs Jul 24, 2017
physical_servers.inject(0) { |t, physical_server| physical_server.host.nil? ? t : t + 1 }
end

def total_hosts; count_physical_servers_with_host; end
Copy link
Member

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.

Copy link
Author

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

@miq-bot
Copy link
Member

miq-bot commented Jul 27, 2017

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
3 files checked, 0 offenses detected
Everything looks fine. 👍

@blomquisg blomquisg merged commit 23c6fa0 into ManageIQ:master Jul 27, 2017
@blomquisg blomquisg added this to the Sprint 66 Ending Aug 7, 2017 milestone Jul 27, 2017
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