Sha256: 516c1a97f736eb1e61b2810136bafc5ef37329cf0649f8674a0ec0eadf53ac5b

Contents?: true

Size: 546 Bytes

Versions: 31

Compression:

Stored size: 546 Bytes

Contents

require 'fog/core/collection'
require 'fog/brightbox/models/compute/user'

module Fog
  module Compute
    class Brightbox

      class Users < Fog::Collection

        model Fog::Compute::Brightbox::User

        def all
          data = connection.list_users
          load(data)
        end

        def get(identifier)
          return nil if identifier.nil? || identifier == ""
          data = connection.get_user(identifier)
          new(data)
        rescue Excon::Errors::NotFound
          nil
        end

      end

    end
  end
end

Version data entries

31 entries across 31 versions & 9 rubygems

Version Path
fog-parser-fix-1.6.1 lib/fog/brightbox/models/compute/users.rb
fog-test-again-1.6.0 lib/fog/brightbox/models/compute/users.rb
fog-parser-fix-1.6.0 lib/fog/brightbox/models/compute/users.rb
fog-1.6.0 lib/fog/brightbox/models/compute/users.rb
fog-1.5.0 lib/fog/brightbox/models/compute/users.rb
fog-1.4.0 lib/fog/brightbox/models/compute/users.rb
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/users.rb
michiels-fog-1.3.1 lib/fog/brightbox/models/compute/users.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/brightbox/models/compute/users.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/users.rb
fog-1.3.1 lib/fog/brightbox/models/compute/users.rb
fog-1.3.0 lib/fog/brightbox/models/compute/users.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/users.rb
fog-1.2.0 lib/fog/brightbox/models/compute/users.rb
ktheory-fog-1.1.2 lib/fog/brightbox/models/compute/users.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/users.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/users.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/users.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/users.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/users.rb