class ManageIQ::ApplianceConsole::DatabaseReplicationPrimary
Constants
- REGISTER_CMD
Public Class Methods
new()
click to toggle source
# File lib/manageiq/appliance_console/database_replication_primary.rb, line 8 def initialize self.node_number = nil self.database_name = "vmdb_production" self.database_user = "root" self.database_password = nil self.primary_host = LinuxAdmin::NetworkInterface.new(NETWORK_INTERFACE).address end
Public Instance Methods
activate()
click to toggle source
# File lib/manageiq/appliance_console/database_replication_primary.rb, line 30 def activate say("Configuring Primary Replication Server...") create_config_file(primary_host) && run_repmgr_command(REGISTER_CMD) && write_pgpass_file end
ask_questions()
click to toggle source
# File lib/manageiq/appliance_console/database_replication_primary.rb, line 16 def ask_questions clear_screen say("Establish Primary Replication Server\n") ask_for_unique_cluster_node_number ask_for_database_credentials return false if repmgr_configured? && !confirm_reconfiguration confirm end
confirm()
click to toggle source
Calls superclass method
ManageIQ::ApplianceConsole::DatabaseReplication#confirm
# File lib/manageiq/appliance_console/database_replication_primary.rb, line 25 def confirm super agree("Apply this Replication Server Configuration? (Y/N): ") end