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-maestrodev-1.18.0.20131218202447 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131205181604 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131126122111 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131125111730 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131125083406 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131123105121 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131122203507 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131121075022 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131118164830 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131115184302 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131114200144 lib/fog/openstack/requests/compute/list_key_pairs.rb
gapinc-fog-1.12.1.2.1 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131112185232 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-maestrodev-1.18.0.20131111203459 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.18.0 lib/fog/openstack/requests/compute/list_key_pairs.rb