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:
parent
62e1c092e0
commit
c53f2659b9
1 changed files with 56 additions and 0 deletions
56
lib/fog/xenserver/requests/compute/create_sr.rb
Normal file
56
lib/fog/xenserver/requests/compute/create_sr.rb
Normal 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
|
Loading…
Add table
Reference in a new issue