Sha256: f8d3bb24dcda64d8b8e4a5fb11fe28258ed110f5b89fe73c71a6e657835b7cab

Contents?: true

Size: 1.19 KB

Versions: 85

Compression:

Stored size: 1.19 KB

Contents

module Fog
  module Compute
    class OpenStack
      class Real

        def list_key_pairs
          request(
            :expects  => [200, 203],
            :method   => 'GET',
            :path     => 'os-keypairs.json'
          )
        end

      end

      class Mock
        def list_key_pairs
          response = Excon::Response.new
          response.status = 200
          response.headers = {
            "X-Compute-Request-Id" => "req-c373a42c-2825-4e60-8d34-99416ea850be",
            "Content-Type" => "application/json",
            "Content-Length" => "360",
            "Date" => Date.new}
          response.body = {
            "keypairs" => [{
              "keypair" => {
                "public_key" => "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDCdAZLjln1tJbLVVkNHjWFSoKen2nZbk39ZfqhZJOMdeFdz02GWBS4rcuHboeGg/gozKRwsLu4N6NLPlYtbK/NapJIvgO/djBp+FG1QZNtLPsx7j4hVJac3yISGms+Xtu4cEv6j5sFDzAgTQbWz0Z1+9qOq9ngdaoW+YClfQ== vagrant@nova\n",
                "name" => "test_key",
                "fingerprint" => "97:86:f4:15:68:0c:7b:a7:e5:8f:f0:bd:1f:27:65:ad"
              }
            }]
          }
          response
        end
      end # mock
    end # openstack
  end # compute
end # fog

Version data entries

85 entries across 85 versions & 13 rubygems

Version Path
fog-1.11.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-nirvanix-1.8.1 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.10.1 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-parser-fix-1.6.1 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-test-again-1.6.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-test-me-1.10.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-parser-fix-1.6.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
cifrado-0.1.3 vendor/fog/lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.10.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
cifrado-0.1.2 vendor/fog/lib/fog/openstack/requests/compute/list_key_pairs.rb
cifrado-0.1.1 vendor/fog/lib/fog/openstack/requests/compute/list_key_pairs.rb
cifrado-0.1 vendor/fog/lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.9.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.8.0.20130114204828 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.8.0.20130111070250 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.8.0.20130109172219 lib/fog/openstack/requests/compute/list_key_pairs.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-sgonyea-1.8.1 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.8.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/openstack/requests/compute/list_key_pairs.rb