2012-04-02 13:25:03 +02:00
|
|
|
require 'fog/core/model'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class XenServer
|
|
|
|
|
|
|
|
class StorageRepository < Fog::Model
|
|
|
|
# API Reference here:
|
|
|
|
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=SR
|
|
|
|
|
|
|
|
identity :reference
|
|
|
|
|
2012-04-02 15:27:35 +02:00
|
|
|
attribute :name, :aliases => :name_label
|
|
|
|
attribute :description, :aliases => :name_description
|
2012-04-02 13:25:03 +02:00
|
|
|
attribute :uuid
|
|
|
|
attribute :allowed_operations
|
2012-04-02 15:27:35 +02:00
|
|
|
attribute :current_operations
|
2012-04-02 13:25:03 +02:00
|
|
|
attribute :content_type
|
|
|
|
attribute :other_config
|
2012-04-02 15:27:35 +02:00
|
|
|
attribute :__pbds, :aliases => :PBDs
|
2012-04-02 13:25:03 +02:00
|
|
|
attribute :shared
|
|
|
|
attribute :type
|
2012-04-02 15:27:35 +02:00
|
|
|
attribute :tags
|
|
|
|
attribute :__vdis, :aliases => :VDIs
|
|
|
|
attribute :physical_size
|
|
|
|
attribute :physical_utilisation
|
2012-04-02 13:25:03 +02:00
|
|
|
|
2012-04-02 15:27:35 +02:00
|
|
|
def vdis
|
|
|
|
__vdis.collect { |vdi| connection.vdis.get vdi }
|
2012-04-02 13:25:03 +02:00
|
|
|
end
|
|
|
|
|
2012-04-02 15:27:35 +02:00
|
|
|
def pbds
|
|
|
|
__pbds.collect { |pbd| connection.pbds.get pbd }
|
|
|
|
end
|
|
|
|
|
2012-04-02 13:25:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|