Class: Kontena::Plugin::Cloud::Region::ListCommand
- Inherits:
-
Command
- Object
- Clamp::Command
- Command
- Kontena::Plugin::Cloud::Region::ListCommand
- Includes:
- Cli::Common, Cli::TableGenerator::Helper
- Defined in:
- lib/kontena/plugin/cloud/region/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/region/list_command.rb', line 7 def execute regions = cloud_client.get('/regions')['data'] print_table(regions) do |row| row.merge!(row['attributes']) end end |
#fields ⇒ Object
14 15 16 17 18 19 |
# File 'lib/kontena/plugin/cloud/region/list_command.rb', line 14 def fields { id: 'id', name: 'name' } end |