Sha256: d993c27edb0bd74863adbf5b321c9ba0ab0134efdb989b8b1c825c17f37885a3

Contents?: true

Size: 412 Bytes

Versions: 28

Compression:

Stored size: 412 Bytes

Contents

module Kontena::Cli::Grids::TrustedSubnets
  class ListCommand < Clamp::Command
    include Kontena::Cli::Common

    parameter "NAME", "Grid name"

    def execute
      require_api_url
      token = require_token
      grid = client(token).get("grids/#{current_grid}")
      trusted_subnets = grid['trusted_subnets'] || []
      trusted_subnets.each do |subnet|
        puts subnet
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
kontena-cli-0.14.1 lib/kontena/cli/grids/trusted_subnets/list_command.rb
kontena-cli-0.14.0 lib/kontena/cli/grids/trusted_subnets/list_command.rb
kontena-cli-0.13.4 lib/kontena/cli/grids/trusted_subnets/list_command.rb
kontena-cli-0.13.3 lib/kontena/cli/grids/trusted_subnets/list_command.rb
kontena-cli-0.13.2 lib/kontena/cli/grids/trusted_subnets/list_command.rb
kontena-cli-0.13.1 lib/kontena/cli/grids/trusted_subnets/list_command.rb
kontena-cli-0.13.0.1 lib/kontena/cli/grids/trusted_subnets/list_command.rb
kontena-cli-0.13.0 lib/kontena/cli/grids/trusted_subnets/list_command.rb