Class: ThreeScaleToolbox::Commands::ProxyConfigCommand::List::ListSubcommand
- Inherits:
-
Cri::CommandRunner
- Object
- Cri::CommandRunner
- ThreeScaleToolbox::Commands::ProxyConfigCommand::List::ListSubcommand
show all
- Includes:
- ThreeScaleToolbox::Command
- Defined in:
- lib/3scale_toolbox/commands/proxy_config_command/list_command.rb
Constant Summary
collapse
- FIELDS =
%w[id version environment]
Class Method Summary
collapse
Instance Method Summary
collapse
#config, #config_file, #exit_with_message, #fetch_required_option, included, #remotes, #threescale_client, #verbose, #verify_ssl
Class Method Details
.command ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/3scale_toolbox/commands/proxy_config_command/list_command.rb', line 10
def self.command
Cri::Command.define do
name 'list'
usage 'list <remote> <service> <environment>'
summary 'List Proxy Configurations'
description 'List all defined Proxy Configurations'
ThreeScaleToolbox::CLI.output_flag(self)
param :remote
param :service_ref
param :environment
runner ListSubcommand
end
end
|
Instance Method Details
#run ⇒ Object
26
27
28
|
# File 'lib/3scale_toolbox/commands/proxy_config_command/list_command.rb', line 26
def run
printer.print_collection service.proxy_configs(proxy_config_environment).map(&:attrs)
end
|