Class: Central::Cli::Stacks::TrustedSubnets::AddCommand
- Inherits:
-
Clamp::Command
- Object
- Clamp::Command
- Central::Cli::Stacks::TrustedSubnets::AddCommand
- Includes:
- Common
- Defined in:
- lib/central/cli/stacks/trusted_subnets/add_command.rb
Instance Method Summary collapse
Methods included from Common
#access_token=, #add_master, #api_url, #api_url=, #clear_current_stack, #client, #current_master, #current_master=, #current_master_index, #current_stack, #current_stack=, #ensure_custom_ssl_ca, #require_api_url, #require_current_stack, #require_token, #reset_client, #save_settings, #settings, #settings_filename
Instance Method Details
#execute ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/central/cli/stacks/trusted_subnets/add_command.rb', line 8 def execute require_api_url token = require_token stack = client(token).get("stacks/#{name}") data = { trusted_subnets: stack['trusted_subnets'] + [subnet] } client(token).put("stacks/#{name}", data) end |