Class: Rubber::Configuration::InstanceItem

Inherits:
Object
  • Object
show all
Defined in:
lib/rubber/instance.rb

Overview

The configuration for a single instance

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#domainObject (readonly)

Returns the value of attribute domain.



79
80
81
# File 'lib/rubber/instance.rb', line 79

def domain
  @domain
end

#external_hostObject

Returns the value of attribute external_host.



81
82
83
# File 'lib/rubber/instance.rb', line 81

def external_host
  @external_host
end

#external_ipObject

Returns the value of attribute external_ip.



81
82
83
# File 'lib/rubber/instance.rb', line 81

def external_ip
  @external_ip
end

#instance_idObject (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_hostObject

Returns the value of attribute internal_host.



82
83
84
# File 'lib/rubber/instance.rb', line 82

def internal_host
  @internal_host
end

#internal_ipObject

Returns the value of attribute internal_ip.



82
83
84
# File 'lib/rubber/instance.rb', line 82

def internal_ip
  @internal_ip
end

#nameObject (readonly)

Returns the value of attribute name.



79
80
81
# File 'lib/rubber/instance.rb', line 79

def name
  @name
end

#partitionsObject

Returns the value of attribute partitions.



83
84
85
# File 'lib/rubber/instance.rb', line 83

def partitions
  @partitions
end

#platformObject

Returns the value of attribute platform.



85
86
87
# File 'lib/rubber/instance.rb', line 85

def platform
  @platform
end

#rolesObject

Returns the value of attribute roles.



80
81
82
# File 'lib/rubber/instance.rb', line 80

def roles
  @roles
end

#security_groupsObject (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_idObject

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_ipObject

Returns the value of attribute static_ip.



83
84
85
# File 'lib/rubber/instance.rb', line 83

def static_ip
  @static_ip
end

#volumesObject

Returns the value of attribute volumes.



83
84
85
# File 'lib/rubber/instance.rb', line 83

def volumes
  @volumes
end

#zoneObject

Returns the value of attribute zone.



80
81
82
# File 'lib/rubber/instance.rb', line 80

def zone
  @zone
end

Instance Method Details

#full_nameObject



95
96
97
# File 'lib/rubber/instance.rb', line 95

def full_name
  "#@name.#@domain"
end

#role_namesObject



99
100
101
# File 'lib/rubber/instance.rb', line 99

def role_names()
  roles.collect {|r| r.name}
end

#windows?Boolean

Returns:

  • (Boolean)


108
109
110
# File 'lib/rubber/instance.rb', line 108

def windows?
  platform == 'windows'
end