Class: Rubber::Configuration::InstanceItem
- Inherits:
-
Object
- Object
- Rubber::Configuration::InstanceItem
- Defined in:
- lib/rubber/instance.rb
Overview
The configuration for a single instance
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#external_host ⇒ Object
Returns the value of attribute external_host.
-
#external_ip ⇒ Object
Returns the value of attribute external_ip.
-
#instance_id ⇒ Object
readonly
Returns the value of attribute instance_id.
-
#internal_host ⇒ Object
Returns the value of attribute internal_host.
-
#internal_ip ⇒ Object
Returns the value of attribute internal_ip.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#partitions ⇒ Object
Returns the value of attribute partitions.
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#roles ⇒ Object
Returns the value of attribute roles.
-
#root_device_type ⇒ Object
Returns the value of attribute root_device_type.
-
#security_groups ⇒ Object
readonly
Returns the value of attribute security_groups.
-
#spot_instance_request_id ⇒ Object
Returns the value of attribute spot_instance_request_id.
-
#static_ip ⇒ Object
Returns the value of attribute static_ip.
-
#volumes ⇒ Object
Returns the value of attribute volumes.
-
#zone ⇒ Object
Returns the value of attribute zone.
Instance Method Summary collapse
- #full_name ⇒ Object
-
#initialize(name, domain, roles, instance_id, security_group_list = []) ⇒ InstanceItem
constructor
A new instance of InstanceItem.
- #role_names ⇒ Object
- #windows? ⇒ Boolean
Constructor Details
#initialize(name, domain, roles, instance_id, security_group_list = []) ⇒ InstanceItem
Returns a new instance of InstanceItem.
87 88 89 90 91 92 93 |
# File 'lib/rubber/instance.rb', line 87 def initialize(name, domain, roles, instance_id, security_group_list=[]) @name = name @domain = domain @roles = roles @instance_id = instance_id @security_groups = security_group_list end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
79 80 81 |
# File 'lib/rubber/instance.rb', line 79 def domain @domain end |
#external_host ⇒ Object
Returns the value of attribute external_host.
81 82 83 |
# File 'lib/rubber/instance.rb', line 81 def external_host @external_host end |
#external_ip ⇒ Object
Returns the value of attribute external_ip.
81 82 83 |
# File 'lib/rubber/instance.rb', line 81 def external_ip @external_ip end |
#instance_id ⇒ Object (readonly)
Returns the value of attribute instance_id.
79 80 81 |
# File 'lib/rubber/instance.rb', line 79 def instance_id @instance_id end |
#internal_host ⇒ Object
Returns the value of attribute internal_host.
82 83 84 |
# File 'lib/rubber/instance.rb', line 82 def internal_host @internal_host end |
#internal_ip ⇒ Object
Returns the value of attribute internal_ip.
82 83 84 |
# File 'lib/rubber/instance.rb', line 82 def internal_ip @internal_ip end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
79 80 81 |
# File 'lib/rubber/instance.rb', line 79 def name @name end |
#partitions ⇒ Object
Returns the value of attribute partitions.
83 84 85 |
# File 'lib/rubber/instance.rb', line 83 def partitions @partitions end |
#platform ⇒ Object
Returns the value of attribute platform.
85 86 87 |
# File 'lib/rubber/instance.rb', line 85 def platform @platform end |
#roles ⇒ Object
Returns the value of attribute roles.
80 81 82 |
# File 'lib/rubber/instance.rb', line 80 def roles @roles end |
#root_device_type ⇒ Object
Returns the value of attribute root_device_type.
83 84 85 |
# File 'lib/rubber/instance.rb', line 83 def root_device_type @root_device_type end |
#security_groups ⇒ Object (readonly)
Returns the value of attribute security_groups.
79 80 81 |
# File 'lib/rubber/instance.rb', line 79 def security_groups @security_groups end |
#spot_instance_request_id ⇒ Object
Returns the value of attribute spot_instance_request_id.
84 85 86 |
# File 'lib/rubber/instance.rb', line 84 def spot_instance_request_id @spot_instance_request_id end |
#static_ip ⇒ Object
Returns the value of attribute static_ip.
83 84 85 |
# File 'lib/rubber/instance.rb', line 83 def static_ip @static_ip end |
#volumes ⇒ Object
Returns the value of attribute volumes.
83 84 85 |
# File 'lib/rubber/instance.rb', line 83 def volumes @volumes end |
#zone ⇒ Object
Returns the value of attribute zone.
80 81 82 |
# File 'lib/rubber/instance.rb', line 80 def zone @zone end |
Instance Method Details
#full_name ⇒ Object
95 96 97 |
# File 'lib/rubber/instance.rb', line 95 def full_name "#@name.#@domain" end |
#role_names ⇒ Object
99 100 101 |
# File 'lib/rubber/instance.rb', line 99 def role_names() roles.collect {|r| r.name} end |
#windows? ⇒ Boolean
108 109 110 |
# File 'lib/rubber/instance.rb', line 108 def windows? platform == 'windows' end |