Class: Ey::Core::Cli::Status

Inherits:
Subcommand
  • Object
show all
Includes:
Helpers::LogStreaming
Defined in:
lib/ey-core/cli/status.rb

Instance Method Summary collapse

Methods included from Helpers::LogStreaming

#finished_request, #stream_deploy_log

Methods inherited from Subcommand

#handle_core_error, #run_handle, #setup

Methods included from Helpers::Core

#core_account, #core_accounts, #core_application_for, #core_applications, #core_client, #core_environment_for, #core_environment_variables, #core_environments, #core_operator_and_environment_for, #core_server_for, #core_url, #core_yaml, #eyrc_yaml, included, #longest_length_by_name, #operator, #unauthenticated_core_client, #write_core_yaml

Instance Method Details

#handleObject



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/ey-core/cli/status.rb', line 37

def handle
  operator, environment = core_operator_and_environment_for(self.options)
  app                   = core_application_for(environment, self.options)
  deploy                = environment.latest_deploy(app)

  puts environment.release_label
  puts "#{environment.servers.size} servers"
  environment.servers.each do |s|
    puts [s.provisioned_id, s.role, s.state].join(" ")
  end
  if deploy
    ap deploy
    if switch_active?(:tail)
      stream_deploy_log(deploy.request)
    end
  else
    puts "Never Deployed"
  end
end