Sha256: fff5ff399be493aac9b359860da2cd67962af19bb9a800b56cd8904cde310181

Contents?: true

Size: 672 Bytes

Versions: 8

Compression:

Stored size: 672 Bytes

Contents

module Kontena::Cli::ExternalRegistries
  class AddCommand < Clamp::Command
    include Kontena::Cli::Common

    parameter '[URL]', 'Docker Registry url', default: 'https://index.docker.io/v2/'

    option ['-u', '--username'], 'USERNAME', 'Username', required: true
    option ['-e', '--email'], 'EMAIL', 'Email', required: true
    option ['-p', '--password'], 'PASSWORD', 'Password', required: true

    def execute
      require_api_url
      require_current_grid
      token = require_token

      data = { username: username, password: password, email: email, url: url }
      client(token).post("grids/#{current_grid}/external_registries", data)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
kontena-cli-0.11.7 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.11.6 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.11.5 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.11.4 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.11.3 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.11.2 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.11.1 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.11.0 lib/kontena/cli/external_registries/add_command.rb