Class: ThreeScaleToolbox::Commands::ProxyCommand::UpdateSubcommand
- Inherits:
-
Cri::CommandRunner
- Object
- Cri::CommandRunner
- ThreeScaleToolbox::Commands::ProxyCommand::UpdateSubcommand
- Includes:
- ThreeScaleToolbox::Command
- Defined in:
- lib/3scale_toolbox/commands/proxy_command/update_command.rb
Defined Under Namespace
Classes: ProxyParamTransformer
Class Method Summary collapse
Instance Method Summary collapse
Methods included from ThreeScaleToolbox::Command
#config, #config_file, #exit_with_message, #fetch_required_option, included, #keep_alive, #remotes, #threescale_client, #verbose, #verify_ssl
Class Method Details
.command ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/3scale_toolbox/commands/proxy_command/update_command.rb', line 19 def self.command Cri::Command.define do name 'update' usage 'update <remote> <service>' summary 'Update APIcast configuration' description 'Update APIcast configuration' param :remote param :service_ref ThreeScaleToolbox::CLI.output_flag(self) option :p, :param, 'APIcast configuration parameters. Format: [--param key=value]. Multiple options allowed. ', argument: :required, multiple: true, transform: ProxyParamTransformer.new runner UpdateSubcommand end end |
Instance Method Details
#run ⇒ Object
36 37 38 39 40 |
# File 'lib/3scale_toolbox/commands/proxy_command/update_command.rb', line 36 def run raise ThreeScaleToolbox::Error, 'APIcast configuration parameters required' if proxy_attrs.empty? printer.print_record(service.update_proxy(proxy_attrs)) end |