Class: CloudManager::Configuration::Service::Machine

Inherits:
Object
  • Object
show all
Defined in:
lib/cloud_manager/configuration/service/machine.rb

Overview

This class represents a machine along with its settings.

Since:

  • 0.1.0

Direct Known Subclasses

AnsibleMachine, EC2Machine, TestMachine

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(machine_alias, config, parent_service) ⇒ Machine

Returns a new instance of Machine.

Parameters:

  • machine_alias (String)

    the machine alias

  • config (Hash)

    the machine configuration

  • parent_service (AbstractService)

    the initiator service

Since:

  • 0.1.0



24
25
26
27
28
# File 'lib/cloud_manager/configuration/service/machine.rb', line 24

def initialize(machine_alias, config, parent_service)
  @alias = machine_alias
  @config = config
  @parent_service = parent_service
end

Instance Attribute Details

#aliasString (readonly)

Returns the machine alias.

Returns:

  • (String)

    the machine alias

Since:

  • 0.1.0



11
12
13
# File 'lib/cloud_manager/configuration/service/machine.rb', line 11

def alias
  @alias
end

#configHash (readonly)

Returns the machine configuration.

Returns:

  • (Hash)

    the machine configuration

Since:

  • 0.1.0



14
15
16
# File 'lib/cloud_manager/configuration/service/machine.rb', line 14

def config
  @config
end

#parent_serviceAbstractService (readonly)

Returns the initiator service.

Returns:

Since:

  • 0.1.0



17
18
19
# File 'lib/cloud_manager/configuration/service/machine.rb', line 17

def parent_service
  @parent_service
end