Sha256: db456119b2dca1b51740e5a5be140d242c31976c43c478e0c83b374870b20f90

Contents?: true

Size: 1.25 KB

Versions: 19

Compression:

Stored size: 1.25 KB

Contents

module Fog
  module Compute
    class OpenStack
      class Real
        def list_key_pairs(options = {})
          request(
            :expects  => [200, 203],
            :method   => 'GET',
            :path     => 'os-keypairs.json',
            :query    => options
          )
        end
      end

      class Mock
        def list_key_pairs(options = {})
          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

19 entries across 19 versions & 3 rubygems

Version Path
fog-openstack-0.1.10 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-openstack-0.1.9 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-openstack-0.1.8 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-openstack-0.1.7 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-openstack-0.1.6 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-openstack-0.1.5 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-openstack-0.1.4 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-openstack-0.1.3 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-openstack-0.1.2 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-openstack-0.1.1 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-openstack-0.1.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.37.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.36.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.35.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-2.0.0.pre.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.34.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.33.0 lib/fog/openstack/requests/compute/list_key_pairs.rb
fog-1.32.0 lib/fog/openstack/requests/compute/list_key_pairs.rb