2010-11-08 07:21:31 -05:00
|
|
|
require 'fog/core/model'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Brightbox
|
|
|
|
class Compute
|
|
|
|
|
|
|
|
class Account < Fog::Model
|
|
|
|
|
|
|
|
identity :id
|
|
|
|
attribute :resource_type
|
|
|
|
attribute :url
|
|
|
|
attribute :name
|
|
|
|
attribute :status
|
|
|
|
attribute :address_1
|
|
|
|
attribute :address_2
|
|
|
|
attribute :city
|
|
|
|
attribute :county
|
|
|
|
attribute :postcode
|
|
|
|
attribute :country_code
|
|
|
|
attribute :country_name
|
|
|
|
attribute :vat_registration_number
|
|
|
|
attribute :telephone_number
|
|
|
|
attribute :telephone_verified
|
|
|
|
attribute :ram_limit
|
|
|
|
attribute :ram_used
|
|
|
|
attribute :limits_cloudips
|
|
|
|
attribute :library_ftp_host
|
|
|
|
attribute :library_ftp_user
|
|
|
|
# This is always returned as null/nil unless performing a reset_ftp_password request
|
|
|
|
attribute :library_ftp_password
|
2010-11-11 17:35:04 -05:00
|
|
|
attribute :created_at, :type => :time
|
2010-11-08 07:21:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
attribute :owner_id, :aliases => "owner", :squash => "id"
|
|
|
|
attribute :clients
|
|
|
|
attribute :images
|
|
|
|
attribute :servers
|
|
|
|
attribute :users
|
|
|
|
attribute :zones
|
|
|
|
|
|
|
|
def reset_ftp_password
|
|
|
|
requires :identity
|
2010-11-09 12:40:04 -05:00
|
|
|
connection.reset_ftp_password_account(identity)["library_ftp_password"]
|
2010-11-08 07:21:31 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|