2012-04-02 13:25:03 +02:00
|
|
|
require 'fog/core/model'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class XenServer
|
|
|
|
|
|
|
|
class Pool < Fog::Model
|
|
|
|
# API Reference here:
|
|
|
|
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=pool
|
|
|
|
|
|
|
|
identity :reference
|
|
|
|
|
|
|
|
attribute :uuid
|
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 :__default_sr, :aliases => :default_SR
|
2012-04-02 15:27:35 +02:00
|
|
|
attribute :__master, :aliases => :master
|
|
|
|
attribute :tags
|
|
|
|
attribute :restrictions
|
|
|
|
attribute :ha_enabled
|
|
|
|
attribute :vswitch_controller
|
2012-04-02 13:25:03 +02:00
|
|
|
|
2012-04-02 15:27:35 +02:00
|
|
|
|
2012-04-02 13:25:03 +02:00
|
|
|
def default_sr
|
2012-04-02 15:27:35 +02:00
|
|
|
connection.storage_repositories.get __default_sr
|
2012-04-02 13:25:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def default_storage_repository
|
2012-04-02 15:27:35 +02:00
|
|
|
default_sr
|
|
|
|
end
|
|
|
|
|
|
|
|
def master
|
|
|
|
connection.hosts.get __master
|
2012-04-02 13:25:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|