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

#3900 Escape VM name in OpenNebula allocator

This commit is contained in:
Sergey Susikov 2016-07-30 00:57:45 +06:00 committed by GitHub
parent e1a9c6237e
commit 5939cfd1f9

View file

@ -13,7 +13,7 @@ module Fog
xml = ::OpenNebula::VirtualMachine.build_xml
vm = ::OpenNebula::VirtualMachine.new(xml, client)
rc = vm.allocate(attr[:flavor].to_s + "\nNAME=" + attr[:name])
rc = vm.allocate(attr[:flavor].to_s + "\nNAME=\"" + attr[:name] + "\"")
# irb(main):050:0> vm.allocate(s.flavor.to_s + "\nNAME=altest5")
# => #<OpenNebula::Error:0x00000002a50760 @message="[VirtualMachineAllocate] User [42] : Not authorized to perform CREATE VM.", @errno=512>