From eba387e3b1eed1e182b094e0a4f58990ede562c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= <cmartin@opennebula.org> Date: Wed, 5 Nov 2014 18:42:43 +0100 Subject: [PATCH] Feature #3264: Add vm name to showback xml body --- src/vm/VirtualMachinePool.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vm/VirtualMachinePool.cc b/src/vm/VirtualMachinePool.cc index aa9ee823a1..63e04d71a4 100644 --- a/src/vm/VirtualMachinePool.cc +++ b/src/vm/VirtualMachinePool.cc @@ -648,6 +648,7 @@ void VirtualMachinePool::calculate_showback(time_t start_time, time_t end_time) int gid = 0; string uname = ""; string gname = ""; + string vmname = ""; if (vm != 0) { @@ -657,6 +658,8 @@ void VirtualMachinePool::calculate_showback(time_t start_time, time_t end_time) uname = vm->get_uname(); gname = vm->get_gname(); + vmname = vm->get_name(); + vm->unlock(); } @@ -668,6 +671,7 @@ void VirtualMachinePool::calculate_showback(time_t start_time, time_t end_time) body << "<SHOWBACK>" << "<VMID>" << vmid << "</VMID>" + << "<VMNAME>" << vmname << "</VMNAME>" << "<UID>" << uid << "</UID>" << "<GID>" << gid << "</GID>" << "<UNAME>" << uname << "</UNAME>"