Skip to content

Commit

Permalink
Merge pull request #1278 from GregP/cloud_topology_power_status_nil
Browse files Browse the repository at this point in the history
Verify VM power status is not Nil when displaying Cloud Topology
(cherry picked from commit c34bcd6)

https://bugzilla.redhat.com/show_bug.cgi?id=1448207
  • Loading branch information
h-kataria authored and simaishi committed May 4, 2017
1 parent 7236ecf commit 5a9c09c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/cloud_topology_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def entity_status(entity)
if entity.kind_of?(ManageIQ::Providers::CloudManager)
entity.authentications.blank? ? 'Unknown' : entity.authentications.first.status.try(:capitalize)
elsif entity.kind_of?(Vm)
entity.power_state.capitalize
entity.power_state.nil? ? 'Unknown' : entity.power_state.capitalize
elsif entity.kind_of?(AvailabilityZone)
'OK'
elsif entity.kind_of?(CloudTenant)
Expand Down

0 comments on commit 5a9c09c

Please sign in to comment.