Class: Kontena::Plugin::Cloud::Organization::ShowCommand

Inherits:
Command
  • Object
show all
Includes:
Cli::Common
Defined in:
lib/kontena/plugin/cloud/organization/show_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

#executeObject



8
9
10
11
12
13
14
15
# File 'lib/kontena/plugin/cloud/organization/show_command.rb', line 8

def execute
  org = cloud_client.get("/organizations/#{name}").dig('data', 'attributes')
  puts "#{org['name']}:"
  puts "  email: #{org['email']}"
  puts "  your role: #{org['owner'] ? 'owner' : 'member'}"
  puts "  url: #{org['url'] || '-'}"
  puts "  location: #{org['location'] || '-'}"
end