mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
make sure I'm getting valid data back.
This commit is contained in:
parent
60121508b3
commit
b4c5766c69
1 changed files with 3 additions and 1 deletions
|
@ -44,8 +44,10 @@ module Fog
|
|||
|
||||
def ready?
|
||||
data = service.get_server(self.name, self.zone_name).body
|
||||
p data
|
||||
data['zone_name'] = self.zone_name
|
||||
self.merge_attributes(data)
|
||||
|
||||
self.state == RUNNING_STATE
|
||||
end
|
||||
|
||||
|
@ -84,7 +86,7 @@ module Fog
|
|||
end
|
||||
|
||||
# Now make sure everything is ok.
|
||||
ready? && !public_ip_address.nil? && public_key && metadata['sshKeys']
|
||||
ready? && !public_ip_address.nil? && public_key && metadata['sshKeys'] && !!Timeout::timeout(8) { ssh('pwd', options) }
|
||||
rescue SystemCallError, Net::SSH::AuthenticationFailed, Timeout::Error
|
||||
false
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue