From 0fd6518a1302d5728262bb2e3ebe985c0606c70b Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Mon, 7 Apr 2014 12:28:15 +0200 Subject: [PATCH] Add SAVED_TEMPLATE_ID to saved template when saving a disk --- src/rm/RequestManagerVirtualMachine.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rm/RequestManagerVirtualMachine.cc b/src/rm/RequestManagerVirtualMachine.cc index 950d268af7..2a64b31afc 100644 --- a/src/rm/RequestManagerVirtualMachine.cc +++ b/src/rm/RequestManagerVirtualMachine.cc @@ -1387,6 +1387,12 @@ void VirtualMachineSaveDisk::request_execute(xmlrpc_c::paramList const& paramLis tmpl->erase("NAME"); tmpl->set(new SingleAttribute("NAME",tmpl_name.str())); + tmpl_name.str(""); + tmpl_name << tid; + + tmpl->erase("SAVED_TEMPLATE_ID"); + tmpl->set(new SingleAttribute("SAVED_TEMPLATE_ID",tmpl_name.str())); + tmpl->replace_disk_image(iid_orig, iname_orig, iuname_orig, img_name, att.uname); //Authorize the template creation operation