Class: Kontena::Plugin::Cloud::Organization::User::ListCommand

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

#executeObject



9
10
11
12
13
14
# File 'lib/kontena/plugin/cloud/organization/user/list_command.rb', line 9

def execute
  members = cloud_client.get("/organizations/#{name}/members")['data']
  print_table(members) do |row|
    row.merge!(row['attributes'])
  end
end

#fieldsObject



16
17
18
19
20
21
# File 'lib/kontena/plugin/cloud/organization/user/list_command.rb', line 16

def fields
  {
    username: 'username',
    role: 'role'
  }
end