Sha256: 55006a51a71fd8f543c1e8f939e82998f74bb802828c859c939e4d4057ef9245

Contents?: true

Size: 480 Bytes

Versions: 1

Compression:

Stored size: 480 Bytes

Contents

module VagrantPlugins
  module ProfitBricks
    module Action
      class ListKeyPairs
        def initialize(app, env)
          @app = app
        end

        def call(env)
          compute_service = env[:profitbricks_compute]
          env[:ui].info ('%s' % ['KeyPair Name'])
          compute_service.key_pairs.sort_by(&:name).each do |keypair|
            env[:ui].info ('%s' % [keypair.name])
          end
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-profitbricks-1.0.0 lib/vagrant-profitbricks/action/list_keypairs.rb