2012-10-19 01:33:20 -04:00
|
|
|
require 'fog/core/model'
|
|
|
|
require 'fog/hp/models/storage/shared_files'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Storage
|
|
|
|
class HP
|
|
|
|
|
|
|
|
class SharedDirectory < Fog::Model
|
|
|
|
|
|
|
|
identity :url
|
|
|
|
|
|
|
|
attribute :bytes, :aliases => 'X-Container-Bytes-Used'
|
|
|
|
attribute :count, :aliases => 'X-Container-Object-Count'
|
|
|
|
|
|
|
|
def files
|
|
|
|
@files ||= begin
|
|
|
|
Fog::Storage::HP::SharedFiles.new(
|
|
|
|
:shared_directory => self,
|
2013-01-18 15:08:27 -05:00
|
|
|
:service => service
|
2012-10-19 01:33:20 -04:00
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-10-26 01:45:00 -04:00
|
|
|
def destroy
|
|
|
|
requires :url
|
|
|
|
# delete is not allowed
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def save(options = {})
|
|
|
|
requires :url
|
2012-10-30 17:47:17 -04:00
|
|
|
# put is not allowed
|
2012-10-26 01:45:00 -04:00
|
|
|
false
|
|
|
|
end
|
2012-10-19 01:33:20 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|