Class: BeakerAnswers::Version20153 Private

Inherits:
Version40 show all
Defined in:
lib/beaker-answers/versions/version20153.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

This class provides answer file information for PE version 2015.3

Direct Known Subclasses

Version20161

Constant Summary

Constants inherited from Answers

Answers::DEFAULT_ANSWERS, Answers::DEFAULT_FORMAT, Answers::DEFAULT_HIERA_ANSWERS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Version30

#host_answers

Methods inherited from Answers

#answer_for, #answer_hiera, #answer_string, #answers, create, #get_defaults_or_answers, #initialize, #installer_configuration_string, #only_host_with_role, supported_upgrade_versions, supported_versions

Constructor Details

This class inherits a constructor from BeakerAnswers::Answers

Class Method Details

.pe_version_matcherObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The version of PE that this set of answers is appropriate for



9
10
11
# File 'lib/beaker-answers/versions/version20153.rb', line 9

def self.pe_version_matcher
  /\A2015\.3/
end

Instance Method Details

#generate_answersObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/beaker-answers/versions/version20153.rb', line 13

def generate_answers
  the_answers = super

  return the_answers if @options[:masterless]

  master = only_host_with_role(@hosts, 'master')
  database = only_host_with_role(@hosts, 'database')
  console = only_host_with_role(@hosts, 'dashboard')

  orchestrator_db = {
    :q_orchestrator_database_name     => answer_for(@options, :q_orchestrator_database_name),
    :q_orchestrator_database_user     => answer_for(@options, :q_orchestrator_database_user),
    :q_orchestrator_database_password => "'#{answer_for(@options, :q_orchestrator_database_password)}'",
  }

  the_answers[master.name].merge!(orchestrator_db)
  the_answers[database.name].merge!(orchestrator_db)

  the_answers[master.name][:q_database_host] = answer_for(@options, :q_database_host, database.to_s)
  the_answers[master.name][:q_database_port] = answer_for(@options, :q_database_port)
  the_answers[master.name][:q_use_application_services] = answer_for(@options, :q_use_application_services, 'y')
  the_answers[console.name][:q_use_application_services] = answer_for(@options, :q_use_application_services, 'y')

  the_answers
end