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 15, 2017
1 parent 42bb088 commit 879c7b3
Show file tree
Hide file tree
Showing 3 changed files with 4 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 @@ -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 879c7b3

Please sign in to comment.