diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-03-27 16:47:54 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-03-27 16:47:54 +0000 |
commit | 929832345dab22c99b1fc331902be5509551576e (patch) | |
tree | 3379e21ed1ffc6cb96b0c5be7df9dd54aa3af01e /yardstick/benchmark/contexts/standalone | |
parent | 79da68a8d4529bbc132228785f0e4c40506fa3ab (diff) | |
parent | 22df4ea07f46023ae07e75796a267b7a9d43cf58 (diff) |
Merge "Improve "Libvirt.virsh_destroy_vm" function"
Diffstat (limited to 'yardstick/benchmark/contexts/standalone')
-rw-r--r-- | yardstick/benchmark/contexts/standalone/model.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yardstick/benchmark/contexts/standalone/model.py b/yardstick/benchmark/contexts/standalone/model.py index ffa37fd37..f18d090d8 100644 --- a/yardstick/benchmark/contexts/standalone/model.py +++ b/yardstick/benchmark/contexts/standalone/model.py @@ -113,7 +113,10 @@ class Libvirt(object): @staticmethod def virsh_destroy_vm(vm_name, connection): - connection.execute("virsh destroy %s" % vm_name) + LOG.info('VM destroy, VM name: %s', vm_name) + status, _, error = connection.execute('virsh destroy %s' % vm_name) + if status: + LOG.warning('Error destroying VM %s. Error: %s', vm_name, error) @staticmethod def _add_interface_address(interface, pci_address): |