Method: EC2ResponseObject.get_hash_from_response

Defined in:
lib/poolparty/net/remoter_bases/ec2/ec2_response_object.rb

.get_hash_from_response(resp, group = 'default') ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/poolparty/net/remoter_bases/ec2/ec2_response_object.rb', line 52

def self.get_hash_from_response(resp, group = 'default')
    {
      :instance_id => resp.instanceId,
      :name => resp.instanceId, 
      :ip => resp.dnsName || "not-assigned",
      :status => resp.instanceState.name,
      :launching_time => resp.launchTime.parse_datetime,
      :internal_ip => resp.privateDnsName,
      :keypair => resp.keyName,
      :security_group => group
    }        
end