class Kontena::Callbacks::ListAndSelectGrid

Public Instance Methods

after() click to toggle source

Runs kontena grids list –use which will auto join the first available grid

# File lib/kontena/callbacks/auth/01_list_and_select_grid_after_master_auth.rb, line 15
def after
  extend Kontena::Cli::Common
  return if command.skip_grid_auto_select?
  return unless current_master
  return unless command.exit_code == 0
  return unless current_master.grid.nil?

  Kontena.run(%w(grid list --use --verbose))
end
after_load() click to toggle source
# File lib/kontena/callbacks/auth/01_list_and_select_grid_after_master_auth.rb, line 7
def after_load
  command.class_eval do
    option ['--skip-grid-auto-select'], :flag, 'Do not auto select grid'
  end
end