mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
d480b3e3c6
* Added missing attributes to Pool and StorageRepository models
40 lines
1 KiB
Ruby
40 lines
1 KiB
Ruby
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
|
|
|
|
attribute :name, :aliases => :name_label
|
|
attribute :description, :aliases => :name_description
|
|
attribute :uuid
|
|
attribute :allowed_operations
|
|
attribute :current_operations
|
|
attribute :content_type
|
|
attribute :other_config
|
|
attribute :__pbds, :aliases => :PBDs
|
|
attribute :shared
|
|
attribute :type
|
|
attribute :tags
|
|
attribute :__vdis, :aliases => :VDIs
|
|
attribute :physical_size
|
|
attribute :physical_utilisation
|
|
|
|
def vdis
|
|
__vdis.collect { |vdi| connection.vdis.get vdi }
|
|
end
|
|
|
|
def pbds
|
|
__pbds.collect { |pbd| connection.pbds.get pbd }
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|