Class: ThreeScaleToolbox::Commands::ProxyConfigCommand::Export::ExportSubcommand

Inherits:
Cri::CommandRunner
  • Object
show all
Includes:
ThreeScaleToolbox::Command
Defined in:
lib/3scale_toolbox/commands/proxy_config_command/export_command.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ThreeScaleToolbox::Command

#config, #config_file, #exit_with_message, #fetch_required_option, included, #remotes, #threescale_client, #verbose, #verify_ssl

Class Method Details

.commandObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/3scale_toolbox/commands/proxy_config_command/export_command.rb', line 8

def self.command
  Cri::Command.define do
    name        'export'
    usage       'export <remote>'
    summary     'Export proxy configuration for the entire provider account'
    description <<-HEREDOC
    Export proxy configuration for the entire provider account
    \n Can be used as 3scale apicast configuration file
    \n https://github.com/3scale/apicast/blob/master/doc/parameters.md#threescale_config_file
    HEREDOC

    param :remote

    ThreeScaleToolbox::CLI.output_flag(self)
    option nil, :environment, "Gateway environment. Must be 'sandbox' or 'production'", default: 'sandbox', argument: :required, transform: ProxyConfigCommand::EnvironmentTransformer.new

    runner ExportSubcommand
  end
end

Instance Method Details

#runObject



28
29
30
# File 'lib/3scale_toolbox/commands/proxy_config_command/export_command.rb', line 28

def run
  printer.print_record proxy_config_list_obj
end