Class: VagrantPlugins::Compose::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant/compose/util/node.rb

Overview

Definisce un nodo, ovvero uno delle istanze di nodi che compongono il cluster

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(box, boxname, hostname, fqdn, aliases, ip, cpus, memory, ansible_groups, attributes, index, group_index) ⇒ Node

Returns a new instance of Node.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/vagrant/compose/util/node.rb', line 19

def initialize(box, boxname, hostname, fqdn, aliases, ip, cpus, memory, ansible_groups, attributes, index, group_index) 
  @box            = box
  @boxname        = boxname
  @hostname       = hostname
  @fqdn           = fqdn
  @aliases        = aliases
  @ip             = ip
  @cpus           = cpus
  @memory         = memory
  @ansible_groups = ansible_groups
  @attributes     = attributes
  @index          = index
  @group_index    = group_index
end

Instance Attribute Details

#aliasesObject (readonly)

Returns the value of attribute aliases.



10
11
12
# File 'lib/vagrant/compose/util/node.rb', line 10

def aliases
  @aliases
end

#ansible_groupsObject (readonly)

Returns the value of attribute ansible_groups.



14
15
16
# File 'lib/vagrant/compose/util/node.rb', line 14

def ansible_groups
  @ansible_groups
end

#attributesObject (readonly)

Returns the value of attribute attributes.



15
16
17
# File 'lib/vagrant/compose/util/node.rb', line 15

def attributes
  @attributes
end

#boxObject (readonly)

Returns the value of attribute box.



6
7
8
# File 'lib/vagrant/compose/util/node.rb', line 6

def box
  @box
end

#boxnameObject (readonly)

Returns the value of attribute boxname.



7
8
9
# File 'lib/vagrant/compose/util/node.rb', line 7

def boxname
  @boxname
end

#cpusObject (readonly)

Returns the value of attribute cpus.



12
13
14
# File 'lib/vagrant/compose/util/node.rb', line 12

def cpus
  @cpus
end

#fqdnObject (readonly)

Returns the value of attribute fqdn.



9
10
11
# File 'lib/vagrant/compose/util/node.rb', line 9

def fqdn
  @fqdn
end

#group_indexObject (readonly)

Returns the value of attribute group_index.



17
18
19
# File 'lib/vagrant/compose/util/node.rb', line 17

def group_index
  @group_index
end

#hostnameObject (readonly)

Returns the value of attribute hostname.



8
9
10
# File 'lib/vagrant/compose/util/node.rb', line 8

def hostname
  @hostname
end

#indexObject (readonly)

Returns the value of attribute index.



16
17
18
# File 'lib/vagrant/compose/util/node.rb', line 16

def index
  @index
end

#ipObject (readonly)

Returns the value of attribute ip.



11
12
13
# File 'lib/vagrant/compose/util/node.rb', line 11

def ip
  @ip
end

#memoryObject (readonly)

Returns the value of attribute memory.



13
14
15
# File 'lib/vagrant/compose/util/node.rb', line 13

def memory
  @memory
end