1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[xenserver] added create_sr request (create Storage Repository)

This commit is contained in:
Sergio Rubio 2012-12-31 00:47:04 +01:00
parent 62e1c092e0
commit c53f2659b9

View file

@ -0,0 +1,56 @@
module Fog
module Compute
class XenServer
class Real
#
# Create a storage repository (SR)
#
# http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=SR
#
def create_sr( host_ref,
name_label,
type,
name_description = nil,
device_config = {},
physical_size = '0',
content_type = nil,
shared = false,
sm_config = {} )
@connection.request(
{:parser => Fog::Parsers::XenServer::Base.new, :method => 'SR.create'},
host_ref,
device_config || {},
physical_size || '0',
name_label,
name_description || '',
type,
content_type,
shared || false,
sm_config || {}
)
end
end
class Mock
def create_sr( host_ref,
name_label,
type,
name_description = nil,
device_config = {},
physical_size = '0',
content_type = nil,
shared = false,
sm_config = {} )
Fog::Mock.not_implemented
end
end
end
end
end