Class: EtnaApp::Config::Set
- Inherits:
-
Etna::Command
- Object
- Etna::Command
- EtnaApp::Config::Set
- Includes:
- WithEtnaClients, WithLogger
- Defined in:
- lib/commands.rb
Instance Attribute Summary
Attributes inherited from Etna::Command
Instance Method Summary collapse
Methods included from WithLogger
Methods included from WithEtnaClients
#environment, #exit, exit, #janus_client, #magma_client, #metis_client, #polyphemus_client, #token
Methods inherited from Etna::Command
#completions, #fill_in_missing_params, #find_command, #initialize, parent_scope
Methods included from Etna::CommandOrExecutor
#command_name, #completions_for, #desc, #flag_argspec, #flag_as_parameter, included, #parse_flags, #program_name, #usage
Constructor Details
This class inherits a constructor from Etna::Command
Instance Method Details
#execute(host, ignore_ssl: false) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/commands.rb', line 56 def execute(host, ignore_ssl: false) polyphemus_client = Etna::Clients::Polyphemus.new( host: host, token: token(ignore_environment: true), ignore_ssl: ignore_ssl) workflow = Etna::Clients::Polyphemus::SetConfigurationWorkflow.new( polyphemus_client: polyphemus_client, config_file: EtnaApp.config_file_path) config = workflow.update_configuration_file(ignore_ssl: ignore_ssl) logger&.info("Updated #{config.environment} configuration from #{host}.") end |