lib/fog/ecloud/requests/compute/virtual_machine_import.rb in fog-1.22.0 vs lib/fog/ecloud/requests/compute/virtual_machine_import.rb in fog-1.22.1
- old
+ new
@@ -1,13 +1,12 @@
module Fog
module Compute
class Ecloud
module Shared
-
def validate_import_server_options(template_uri, options)
required_opts = [:name, :cpus, :memory, :row, :group, :network_uri, :catalog_network_name]
- unless required_opts.all? { |opt| options.has_key?(opt) }
+ unless required_opts.all? { |opt| options.key?(opt) }
raise ArgumentError.new("Required data missing: #{(required_opts - options.keys).map(&:inspect).join(", ")}")
end
options[:network_uri] = [*options[:network_uri]]
options[:template_uri] = template_uri
@@ -46,10 +45,9 @@
end
end
end
class Real
-
def virtual_machine_import(template_uri, options)
options = validate_import_server_options(template_uri, options)
request(
:expects => 201,