Class: Slugforge::FogHost
- Inherits:
-
Host
- Object
- Host
- Slugforge::FogHost
show all
- Defined in:
- lib/slugforge/models/host/fog_host.rb
Instance Attribute Summary
Attributes inherited from Host
#pattern, #server, #slug_name, #status
Instance Method Summary
collapse
Methods inherited from Host
#add_action, #complete?, #deploy, #effective_action, #elapsed_time, #failed?, #has_action?, #initialize, #install?, #output, #record_event, #remove_action, #stage?, #success?, #terminated?, #timeline
Instance Method Details
#id ⇒ Object
17
18
19
|
# File 'lib/slugforge/models/host/fog_host.rb', line 17
def id
@server.id
end
|
#ip ⇒ Object
9
10
11
|
# File 'lib/slugforge/models/host/fog_host.rb', line 9
def ip
@server.public_ip_address
end
|
#is_autoscaled? ⇒ Boolean
21
22
23
|
# File 'lib/slugforge/models/host/fog_host.rb', line 21
def is_autoscaled?
!@server.tags["aws:autoscaling:groupName"].nil?
end
|
#name ⇒ Object
5
6
7
|
# File 'lib/slugforge/models/host/fog_host.rb', line 5
def name
"instance:#{@server.id}, private_name:#{@server.private_dns_name}, public_name:#{@server.dns_name}, ip:#{@server.public_ip_address}"
end
|
#ssh_host ⇒ Object
13
14
15
|
# File 'lib/slugforge/models/host/fog_host.rb', line 13
def ssh_host
@server.dns_name
end
|
#to_status ⇒ Object
25
26
27
28
29
30
31
|
# File 'lib/slugforge/models/host/fog_host.rb', line 25
def to_status
super.merge({
:instance_id => @server.id,
:private_name => @server.private_dns_name,
:public_name => @server.dns_name,
})
end
|