Sha256: 16e038fd3eaa1ff13afd4045630646f14d4b77c32a8153c393bef01692543e8c

Contents?: true

Size: 846 Bytes

Versions: 4

Compression:

Stored size: 846 Bytes

Contents

require "fog/brightbox/model"

module Fog
  module Compute
    class Brightbox
      class User < Fog::Brightbox::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 = service.update_user(identity, options)
          merge_attributes(data)
          true
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
fog-brightbox-0.7.2 lib/fog/brightbox/models/compute/user.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-brightbox-0.7.1/lib/fog/brightbox/models/compute/user.rb
fog-brightbox-0.7.1 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-0.7.0 lib/fog/brightbox/models/compute/user.rb