Skip to content

Commit

Permalink
Save host 'maintenance' value
Browse files Browse the repository at this point in the history
The host 'maintenance' attribute was added to provision vm dialog
by ManageIQ/manageiq#16464

RHV should store this information which is already available during host
refresh.

https://bugzilla.redhat.com/show_bug.cgi?id=1513413
  • Loading branch information
masayag committed Nov 16, 2017
1 parent 42bb088 commit 4e65c62
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def self.host_inv_to_hashes(inv, ems_inv, cluster_uids, _storage_uids)
:vmm_buildnumber => (host_os_version[:build] if host_os_version),
:connection_state => connection_state,
:power_state => power_state,
:maintenance => power_state == 'maintenance',

:operating_system => host_inv_to_os_hash(host_inv, hostname),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def host_inv_to_hashes(inv, ems_inv, cluster_uids, _storage_uids)
:vmm_buildnumber => (host_os_version.build if host_os_version),
:connection_state => connection_state,
:power_state => power_state,
:maintenance => power_state == 'maintenance',
:operating_system => host_inv_to_os_hash(host_inv, hostname),
:ems_cluster => cluster_uids[host_inv.dig(:cluster, :id)],
:hardware => hardware,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def hosts
:vmm_buildnumber => (host_os_version.build if host_os_version),
:connection_state => connection_state,
:power_state => power_state,
:maintenance => power_state == 'maintenance',
:ems_cluster => persister.ems_clusters.lazy_find(ManageIQ::Providers::Redhat::InfraManager.make_ems_ref(cluster.href)),
:ipmi_address => ipmi_address,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ def hosts(extra_attributes = {})
:connection_state,
:power_state,
:ems_cluster,
:ipmi_address
:ipmi_address,
:maintenance
]
}

Expand Down

0 comments on commit 4e65c62

Please sign in to comment.