Class: Cloudkeeper::Aws::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/cloudkeeper/aws/cli.rb

Overview

Class defining CLI of cloudkeeper-aws

Constant Summary collapse

SIGINT =
2
SIGTERM =
15
SIGNALS =
[SIGTERM, SIGINT].freeze

Instance Method Summary collapse

Instance Method Details

#syncObject



71
72
73
74
75
76
77
78
79
80
81
# File 'lib/cloudkeeper/aws/cli.rb', line 71

def sync
  initialize_config
  initialize_logger
  logger.debug { "Running with config: #{Cloudkeeper::Aws::Settings.to_hash.inspect}" }
  initialize_grpc
rescue Cloudkeeper::Aws::Errors::InvalidConfigurationError => ex
  abort ex.message
rescue StandardError => ex
  logger.error "Unexpected error: #{ex.message}"
  raise ex
end

#versionObject



84
85
86
# File 'lib/cloudkeeper/aws/cli.rb', line 84

def version
  $stdout.puts Cloudkeeper::Aws::VERSION
end