diff --git a/src/cli/one_helper/onezone_helper.rb b/src/cli/one_helper/onezone_helper.rb index 13bba6f47c..2a9cbced93 100644 --- a/src/cli/one_helper/onezone_helper.rb +++ b/src/cli/one_helper/onezone_helper.rb @@ -101,8 +101,8 @@ class Replicator # Process files and folders # - # @param sync_db [Boolean] True to sync database - def process_files(sync_db) + # @param sync_database [Boolean] True to sync database + def process_files(sync_database) # Files to be copied copy_onedconf @@ -118,7 +118,7 @@ class Replicator restart_services # Sync database - sync_db + sync_db if sync_database end private @@ -127,14 +127,14 @@ class Replicator # # @param configs [Object] Configuration def fetch_db_config(configs) - configs.store(:backend, configs[:raw]['/TEMPLATE/DB/BACKEND']) + configs.store(:backend, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/BACKEND']) if configs[:backend] == 'mysql' - configs.store(:server, configs[:raw]['/TEMPLATE/DB/SERVER']) - configs.store(:user, configs[:raw]['/TEMPLATE/DB/USER']) - configs.store(:password, configs[:raw]['/TEMPLATE/DB/PASSWD']) - configs.store(:dbname, configs[:raw]['/TEMPLATE/DB/DB_NAME']) - configs.store(:port, configs[:raw]['/TEMPLATE/DB/PORT']) + configs.store(:server, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/SERVER']) + configs.store(:user, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/USER']) + configs.store(:password, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/PASSWD']) + configs.store(:dbname, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/DB_NAME']) + configs.store(:port, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/PORT']) configs[:port] = '3306' if configs[:port] == '0' else STDERR.puts 'No mysql backend configuration found' @@ -147,9 +147,9 @@ class Replicator # @param configs [Object] Configuration def fetch_fed_config(configs) configs.store(:server_id, - configs[:raw]['/TEMPLATE/FEDERATION/SERVER_ID']) + configs[:raw]['/OPENNEBULA_CONFIGURATION/FEDERATION/SERVER_ID']) configs.store(:zone_id, - configs[:raw]['/TEMPLATE/FEDERATION/ZONE_ID']) + configs[:raw]['/OPENNEBULA_CONFIGURATION/FEDERATION/ZONE_ID']) end # Replaces a file with the version located on a remote server diff --git a/src/cli/onezone b/src/cli/onezone index 17307efb11..5fe8948cf7 100755 --- a/src/cli/onezone +++ b/src/cli/onezone @@ -57,7 +57,7 @@ CommandParser::CmdParser.new(ARGV) do } DATABASE = { - :name => 'database', + :name => 'db', :large => '--db', :description => 'Also sync database' }