Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[xenserver] added create_sr request (create Storage Repository)

  • Loading branch information...
commit c53f2659b9889506d34d10bbce99a60418170909 1 parent 62e1c09
@rubiojr authored
Showing with 56 additions and 0 deletions.
  1. +56 −0 lib/fog/xenserver/requests/compute/create_sr.rb
View
56 lib/fog/xenserver/requests/compute/create_sr.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.