Skip to content

Commit

Permalink
Fixes #15151 - properly convert Fog VMs to_s
Browse files Browse the repository at this point in the history
Useful for power action pop up alerts to avoid the nasty inspection
strings.
  • Loading branch information
iNecas authored and ares committed May 24, 2016
1 parent ddf1410 commit 2af9eb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/concerns/fog_extensions/ovirt/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ module Server
alias_method_chain :locked?, :refresh
end

def to_s
name
end

def locked_with_refresh?
@volumes = nil # force reload volumes
locked_without_refresh?
Expand Down
4 changes: 4 additions & 0 deletions app/services/fog_extensions/vsphere/mini_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ def ready?
@state == "poweredOn"
end

def to_s
name
end

private

attr_reader :raw
Expand Down

0 comments on commit 2af9eb1

Please sign in to comment.