Sha256: 3aad56d2133b169ec3c5780b6726748ddf1011f56a786ba8a8998fcadf3fbcc2

Contents?: true

Size: 837 Bytes

Versions: 40

Compression:

Stored size: 837 Bytes

Contents

require 'fog/core/model'

module Fog
  module Compute
    class Brightbox

      class User < Fog::Model

        identity :id
        attribute :resource_type
        attribute :url

        attribute :name
        attribute :email_address
        attribute :ssh_key

        # Boolean flags
        attribute :email_verified
        attribute :messaging_pref

        # Links - to be replaced
        attribute :account_id, :aliases => "default_account", :squash => "id"
        attribute :accounts

        def save
          requires :identity

          options = {
            :email_address => email_address,
            :ssh_key => ssh_key,
            :name => name
          }

          data = connection.update_user(identity, options)
          merge_attributes(data)
          true
        end

      end

    end
  end
end

Version data entries

40 entries across 40 versions & 13 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/brightbox/models/compute/user.rb
fog-nirvanix-1.8.1 lib/fog/brightbox/models/compute/user.rb
fog-parser-fix-1.6.1 lib/fog/brightbox/models/compute/user.rb
fog-test-again-1.6.0 lib/fog/brightbox/models/compute/user.rb
fog-parser-fix-1.6.0 lib/fog/brightbox/models/compute/user.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/brightbox/models/compute/user.rb
fog-sgonyea-1.8.1 lib/fog/brightbox/models/compute/user.rb
fog-1.8.0 lib/fog/brightbox/models/compute/user.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/brightbox/models/compute/user.rb
fog-1.7.0 lib/fog/brightbox/models/compute/user.rb
fog-1.6.0 lib/fog/brightbox/models/compute/user.rb
fog-1.5.0 lib/fog/brightbox/models/compute/user.rb
fog-1.4.0 lib/fog/brightbox/models/compute/user.rb
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/user.rb
michiels-fog-1.3.1 lib/fog/brightbox/models/compute/user.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/brightbox/models/compute/user.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/user.rb
fog-1.3.1 lib/fog/brightbox/models/compute/user.rb
fog-1.3.0 lib/fog/brightbox/models/compute/user.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/user.rb