Sha256: 7e8be2af1bb5903ca27a63c571a2f1dc5135fa80d8810b2a9bfdb1cdddb3205d

Contents?: true

Size: 1.21 KB

Versions: 12

Compression:

Stored size: 1.21 KB

Contents

module Fog
  module Compute
    class RackspaceV2
      class Real
        # Returns a list of all key pairs associated with an account.
        # @return  [Excon::Response] response :
        #   * body [Hash]: -
        #     * 'keypairs' [Array]: list of keypairs
        #       * 'keypair' [Hash]: -
        #           * 'fingerprint' [String]: unique fingerprint of the keypair
        #           * 'name' [String]: unique name of the keypair
        #           * 'public_key' [String]: the public key assigned to the keypair
        # @raise [Fog::Compute::RackspaceV2::NotFound]
        # @raise [Fog::Compute::RackspaceV2::BadRequest]
        # @raise [Fog::Compute::RackspaceV2::InternalServerError]
        # @raise [Fog::Compute::RackspaceV2::ServiceError]
        # @see   http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ListKeyPairs.html
        def list_keypairs
          request(
            :method   => 'GET',
            :expects  => 200,
            :path     => '/os-keypairs'
          )
        end
      end

      class Mock
        def list_keypairs
            response( :status => 200,
                      :body   => { 'keypairs' => self.data[:keypairs] })
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/rackspace/requests/compute_v2/list_keypairs.rb
ns-fog-1.22.11 lib/fog/rackspace/requests/compute_v2/list_keypairs.rb
ns-fog-1.22.10 lib/fog/rackspace/requests/compute_v2/list_keypairs.rb
ns-fog-1.22.9 lib/fog/rackspace/requests/compute_v2/list_keypairs.rb
ns-fog-1.22.8 lib/fog/rackspace/requests/compute_v2/list_keypairs.rb
ns-fog-1.22.7 lib/fog/rackspace/requests/compute_v2/list_keypairs.rb
ns-fog-1.22.6 lib/fog/rackspace/requests/compute_v2/list_keypairs.rb
fog-1.23.0 lib/fog/rackspace/requests/compute_v2/list_keypairs.rb
ns-fog-1.22.4 lib/fog/rackspace/requests/compute_v2/list_keypairs.rb
ns-fog-1.22.3 lib/fog/rackspace/requests/compute_v2/list_keypairs.rb
ns-fog-1.22.2 lib/fog/rackspace/requests/compute_v2/list_keypairs.rb
fog-1.22.1 lib/fog/rackspace/requests/compute_v2/list_keypairs.rb