Sha256: 23134fcd6297cf816714b9ace82d41e1034367455aa4c72419a701afc7f4ccaf

Contents?: true

Size: 579 Bytes

Versions: 33

Compression:

Stored size: 579 Bytes

Contents

require 'fog/openstack/models/collection'
require 'fog/key_manager/openstack/models/secret'

module Fog
  module KeyManager
    class OpenStack
      class Secrets < Fog::OpenStack::Collection
        model Fog::KeyManager::OpenStack::Secret

        def all(options = {})
          load_response(service.list_secrets(options), 'secrets')
        end

        def get(secret_ref)
          if secret = service.get_secret(secret_ref).body
            new(secret)
          end
        rescue Fog::Compute::OpenStack::NotFound
          nil
        end

      end
    end
  end
end

Version data entries

33 entries across 31 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.3.10 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.1.30 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.1.29 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.3.9 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.1.28 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.3.8 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.3.7 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.3.6 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.3.5 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.3.4 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.3.3 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.3.2 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.3.0 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.2.4 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.2.3 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.2.2 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.2.1 lib/fog/key_manager/openstack/models/secrets.rb
fog-openstack-0.2.0 lib/fog/key_manager/openstack/models/secrets.rb
fog-zj-0.1.28 lib/fog/key_manager/openstack/models/secrets.rb