Merge pull request #3901 from Angerslave/patch-1

#3900 Escape VM name in OpenNebula allocator
This commit is contained in:
Paulo Henrique Lopes Ribeiro 2016-09-28 13:31:48 -03:00 committed by GitHub
commit fbdbe4d1a6
1 changed files with 1 additions and 1 deletions

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>