Class: ThreeScaleToolbox::Commands::BackendCommand::CopySubcommand
- Inherits:
-
Cri::CommandRunner
- Object
- Cri::CommandRunner
- ThreeScaleToolbox::Commands::BackendCommand::CopySubcommand
show all
- Includes:
- ThreeScaleToolbox::Command
- Defined in:
- lib/3scale_toolbox/commands/backend_command/copy_command.rb
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
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/3scale_toolbox/commands/backend_command/copy_command.rb', line 13
def self.command
Cri::Command.define do
name 'copy'
usage 'copy [opts] -s <source-remote> -d <target-remote> <source-backend>'
summary 'Copy backend'
description <<-HEREDOC
This command makes a copy of the referenced backend.
Target backend will be searched by source backend system name. System name can be overriden with `--target-system-name` option.
If a backend with the selected `system-name` is not found, it will be created.
\n Components of the backend being copied:
\nmetrics
\nmethods
\nmapping rules
\n\n If a backend with the selected `system-name` is found, it will be updated. Only missing metrics, methods and mapping rules will be created.
HEREDOC
option :s, :source, '3scale source instance. Url or remote name', argument: :required
option :d, :destination, '3scale target instance. Url or remote name', argument: :required
option :t, 'target-system-name', 'Target system name. Default to source system name', argument: :required
param :source_backend
runner CopySubcommand
end
end
|