mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[opennebula] raise an ArgumentError if VM name is empty/nil
This commit is contained in:
parent
03980861d6
commit
52f5473193
1 changed files with 4 additions and 1 deletions
|
@ -5,7 +5,10 @@ module Fog
|
|||
def vm_allocate(attr={ })
|
||||
|
||||
if(attr[:flavor].nil?)
|
||||
raise(ArgumentError.new("Attribute flavor is nil or empty! #{attr.inspect}"))
|
||||
raise(ArgumentError.new("Attribute flavor is nil! #{attr.inspect}"))
|
||||
end
|
||||
if(attr[:name].nil? || attr[:name].empty?)
|
||||
raise(ArgumentError.new("Attribute name is nil or empty! #{attr.inspect}"))
|
||||
end
|
||||
|
||||
xml = ::OpenNebula::VirtualMachine.build_xml
|
||||
|
|
Loading…
Add table
Reference in a new issue