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.22.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.21.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/openstack/requests/compute/list_key_pairs.rb
cifrado-0.2.1 vendor/fog/lib/fog/openstack/requests/compute/list_key_pairs.rb
cifrado-0.2.0 vendor/fog/lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.20.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.19.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/openstack/requests/compute/list_key_pairs.rb