lib/kpm/tasks.rb in kpm-0.6.0 vs lib/kpm/tasks.rb in kpm-0.6.1
- old
+ new
@@ -488,10 +488,14 @@
:desc => 'Data delimiter'
method_option :database_host,
:type => :string,
:default => nil,
:desc => 'Database Host name'
+ method_option :database_port,
+ :type => :string,
+ :default => nil,
+ :desc => 'Database Host name'
desc 'account', 'export/import accounts'
def account
logger.info 'Please wait processing the request!!!'
begin
config_file = nil
@@ -523,11 +527,11 @@
raise Interrupt,'Need to specify an action'
end
account = KPM::Account.new(config_file || options[:config_file],options[:killbill_api_credentials],options[:killbill_credentials],
- options[:killbill_url],options[:database_name],options[:database_credentials],options[:database_host],options[:data_delimiter], logger)
+ options[:killbill_url],options[:database_name],options[:database_credentials],options[:database_host], options[:database_port],options[:data_delimiter], logger)
export_file = nil
round_trip_export_import = false
if not options[:export].nil?
export_file = account.export_data(options[:export])
@@ -641,10 +645,14 @@
:desc => 'Path for the KAUI web app'
method_option :killbill_web_path,
:type => :string,
:default => nil,
:desc => 'Path for the killbill web app'
+ method_option :bundles_dir,
+ :type => :string,
+ :default => nil,
+ :desc => 'A different folder other than the default bundles directory.'
desc 'diagnostic', 'exports and \'zips\' the account data, system, logs and tenant configurations'
def diagnostic
logger.info 'Please wait processing the request!!!'
begin
if options[:account_export] && options[:account_export] == 'account_export'
@@ -679,10 +687,10 @@
raise Interrupt,'--killbill_web_path, please provide a valid killbill web path'
end
diagnostic = KPM::DiagnosticFile.new(options[:config_file],options[:killbill_api_credentials],options[:killbill_credentials],
options[:killbill_url],options[:database_name],options[:database_credentials],
- options[:database_host], options[:kaui_web_path], options[:killbill_web_path],logger)
+ options[:database_host], options[:kaui_web_path], options[:killbill_web_path], options[:bundles_dir],logger)
diagnostic.export_data(options[:account_export], options[:log_dir])
rescue Exception => e
logger.error "\e[91;1m#{e.message}\e[0m"
if not e.is_a?(Interrupt)