2012-04-27 08:25:40 -04:00
|
|
|
require 'fog/core/model'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class Serverlove
|
|
|
|
|
2012-04-27 09:43:52 -04:00
|
|
|
class Drive < Fog::Model
|
2012-04-27 08:25:40 -04:00
|
|
|
|
2012-04-27 09:01:42 -04:00
|
|
|
identity :drive
|
2012-04-27 08:25:40 -04:00
|
|
|
|
|
|
|
attribute :name
|
|
|
|
attribute :user
|
|
|
|
attribute :size
|
2012-04-27 09:01:42 -04:00
|
|
|
attribute :claimed
|
|
|
|
attribute :status
|
2012-04-27 09:43:52 -04:00
|
|
|
attribute :encryption_cipher
|
2012-04-27 08:25:40 -04:00
|
|
|
|
|
|
|
def save
|
|
|
|
# TODO
|
|
|
|
end
|
|
|
|
|
|
|
|
def destroy
|
|
|
|
requires :identity
|
2012-04-27 09:43:52 -04:00
|
|
|
connection.destroy_drive(identity)
|
2012-04-27 08:25:40 -04:00
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|