Sha256: 088c4e36117d464d4a1a8c393bb923c2fb7020fecb9ee48e67c1a2a9c6884072

Contents?: true

Size: 373 Bytes

Versions: 18

Compression:

Stored size: 373 Bytes

Contents

require_relative 'services_helper'

module Kontena::Cli::Services
  class RestartCommand < Clamp::Command
    include Kontena::Cli::Common
    include ServicesHelper

    parameter "NAME", "Service name"

    def execute
      require_api_url
      token = require_token
      result = client(token).post("services/#{parse_service_id(name)}/restart", {})
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
kontena-cli-0.11.3 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.11.2 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.11.1 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.11.0 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.10.3 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.10.2 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.10.1 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.10.0 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.9.3 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.9.2 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.9.1 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.9.0 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.8.4 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.8.3 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.8.2 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.8.1 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.8.0.1 lib/kontena/cli/services/restart_command.rb
kontena-cli-0.8.0 lib/kontena/cli/services/restart_command.rb