26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/3scale_toolbox/commands/application_command/apply_command.rb', line 26
def self.command
Cri::Command.define do
name 'apply'
usage 'apply [opts] <remote> <application>'
summary 'update (or create) application'
description <<-HEREDOC
Update (create if it does not exist) application'
\n Application param allows:
\n * User_key (API key)
\n * App_id (from app_id/app_key pair) or Client ID (for OAuth and OpenID Connect authentication modes)
\n * Application internal id
HEREDOC
option nil, 'user-key', 'User Key (API Key) of the application to be created.', argument: :required
option nil, 'application-key', 'App Key(s) or Client Secret (for OAuth and OpenID Connect authentication modes) of the application to be created. Only used when application does not exist.' , argument: :required
option nil, :description, 'Application description', argument: :required
option nil, :name, 'Application name', argument: :required
option nil, :account, 'Application\'s account. Required when creating', argument: :required
option nil, :service, 'Application\'s service. Required when creating', argument: :required
option nil, :plan, 'Application\'s plan. Required when creating', argument: :required
option nil, :'redirect-url', 'OpenID Connect redirect url', argument: :required
flag nil, :resume, 'Resume a suspended application'
flag nil, :suspend, 'Suspends an application (changes the state to suspended)'
ThreeScaleToolbox::CLI.output_flag(self)
param :remote
param :application
runner ApplySubcommand
end
end
|