Class: Aether::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/aether/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Node

Returns a new instance of Node.



6
7
8
9
# File 'lib/aether/node.rb', line 6

def initialize(node)
  @name = node.name
  @attributes = node.chef_attributes
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



4
5
6
# File 'lib/aether/node.rb', line 4

def attributes
  @attributes
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/aether/node.rb', line 4

def name
  @name
end

Instance Method Details

#hostnameObject Also known as: fqdn



16
17
18
# File 'lib/aether/node.rb', line 16

def hostname
  @hostname ||= attributes.fqdn
end

#ipaddressObject Also known as: local_ipv4



11
12
13
# File 'lib/aether/node.rb', line 11

def ipaddress
  @ipaddress ||= attributes.ipaddress
end