1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/xenserver/models/compute/storage_repository.rb

41 lines
1 KiB
Ruby
Raw Normal View History

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
attribute :name, :aliases => :name_label
attribute :description, :aliases => :name_description
2012-04-02 13:25:03 +02:00
attribute :uuid
attribute :allowed_operations
attribute :current_operations
2012-04-02 13:25:03 +02:00
attribute :content_type
attribute :other_config
attribute :__pbds, :aliases => :PBDs
2012-04-02 13:25:03 +02:00
attribute :shared
attribute :type
attribute :tags
attribute :__vdis, :aliases => :VDIs
attribute :physical_size
attribute :physical_utilisation
2012-04-02 13:25:03 +02:00
def vdis
__vdis.collect { |vdi| connection.vdis.get vdi }
2012-04-02 13:25:03 +02:00
end
def pbds
__pbds.collect { |pbd| connection.pbds.get pbd }
end
2012-04-02 13:25:03 +02:00
end
end
end
end