Sha256: 40ec186654285dc6df9eea1dd78b16feee897e8eb1a470fae7f660e87ee954c3

Contents?: true

Size: 532 Bytes

Versions: 11

Compression:

Stored size: 532 Bytes

Contents

require 'chef/knife/joyent_base'

class Chef
  class Knife
    class JoyentKeyList < Knife

      include Knife::JoyentBase

      banner "knife joyent key list"

      def run
        keys = [
          ui.color('Name', :bold),
          ui.color('Key', :bold),
        ]

        self.connection.keys.sort_by(&:name).each do |k|
          keys << k.name
          keys << k.key[0..32] + '...'
        end

        puts ui.list(keys, :uneven_columns_across, 2)
      rescue => e
        output_error(e)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
knife-joyent-0.4.14 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.4.12 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.4.11 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.4.10 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.4.9 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.4.8 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.4.5 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.4.4 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.4.3 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.4.2 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.4.1 lib/chef/knife/joyent_key_list.rb