Sha256: 40d13b74ce2d049fad410dcc32ea5280fb1ddbaec2f4e501f813a8610d2691cd

Contents?: true

Size: 510 Bytes

Versions: 29

Compression:

Stored size: 510 Bytes

Contents

require 'fog/digitalocean/models/compute/ssh_key'

module Fog
  module Compute
    class DigitalOcean
      class SshKeys < Fog::Collection
        identity :href

        model Fog::Compute::DigitalOcean::SshKey

        def all
          data = service.list_ssh_keys.body['ssh_keys']
          load(data)
        end

        def get(uri)
          data = service.get_ssh_key(uri).body['ssh_key']
          new(data)
        rescue Fog::Errors::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 4 rubygems

Version Path
fog-1.37.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.36.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.35.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-2.0.0.pre.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.34.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.33.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.32.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.31.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.30.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.29.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.28.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.27.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.26.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.25.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
nsidc-fog-1.24.1 lib/fog/digitalocean/models/compute/ssh_keys.rb
fog-1.24.0 lib/fog/digitalocean/models/compute/ssh_keys.rb
ns-fog-1.22.11 lib/fog/digitalocean/models/compute/ssh_keys.rb
ns-fog-1.22.10 lib/fog/digitalocean/models/compute/ssh_keys.rb