Sha256: ee27f7cf0ee2ac815a949618fa7dbc3c67e34ada83e60fa4204271db6ecc6e9a

Contents?: true

Size: 704 Bytes

Versions: 16

Compression:

Stored size: 704 Bytes

Contents

module Kontena::Cli::Nodes::Azure
  class TerminateCommand < Clamp::Command
    include Kontena::Cli::Common

    parameter "NAME", "Node name"
    option "--subscription-id", "SUBSCRIPTION ID", "Azure subscription id", required: true
    option "--subscription-cert", "CERTIFICATE", "Path to Azure management certificate", attribute_name: :certificate, required: true

    def execute
      require_api_url
      require_current_grid

      require 'kontena/machine/azure'

      grid = client(require_token).get("grids/#{current_grid}")
      destroyer = Kontena::Machine::Azure::NodeDestroyer.new(client(require_token), subscription_id, certificate)
      destroyer.run!(grid, name)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
kontena-cli-0.11.7 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.11.6 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.11.5 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.11.4 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.11.3 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.11.2 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.11.1 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.11.0 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.10.3 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.10.2 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.10.1 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.10.0 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.9.3 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.9.2 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.9.1 lib/kontena/cli/nodes/azure/terminate_command.rb
kontena-cli-0.9.0 lib/kontena/cli/nodes/azure/terminate_command.rb