Class: Kontena::Plugin::Cloud::Token::ListCommand
- Includes:
- Cli::Common, Cli::TableGenerator::Helper
- Defined in:
- lib/kontena/plugin/cloud/token/list_command.rb
Constant Summary
Constants included from CloudCommand
CloudCommand::PLATFORM_NOT_SELECTED_ERROR
Instance Method Summary collapse
Methods included from CloudCommand
#verify_current_grid, #verify_current_master, #verify_current_master_token
Instance Method Details
#execute ⇒ Object
7 8 9 10 11 12 |
# File 'lib/kontena/plugin/cloud/token/list_command.rb', line 7 def execute tokens = cloud_client.get('/user/personal_access_tokens')['data'] print_table(tokens) do |row| row.merge!(row['attributes']) end end |
#fields ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/kontena/plugin/cloud/token/list_command.rb', line 14 def fields { id: 'id', created: 'created-at', name: 'name' } end |