From 21631439510f5e54725b8a1566937755c39337ff Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Thu, 26 Jul 2018 12:13:30 -0400 Subject: [PATCH] Create and remove the failedreason key Fixes a forgotten addition of this element being created. Closes #15 --- pvc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pvc.py b/pvc.py index ca499438..3300a311 100755 --- a/pvc.py +++ b/pvc.py @@ -817,6 +817,7 @@ def define_vm(config, target_hypervisor, selector): transaction.create('/domains/{}/state'.format(dom_uuid), 'stop'.encode('ascii')) transaction.create('/domains/{}/hypervisor'.format(dom_uuid), target_hypervisor.encode('ascii')) transaction.create('/domains/{}/lasthypervisor'.format(dom_uuid), ''.encode('ascii')) + transaction.create('/domains/{}/failedreason'.format(dom_uuid), ''.encode('ascii')) transaction.create('/domains/{}/xml'.format(dom_uuid), data.encode('ascii')) results = transaction.commit() @@ -988,6 +989,7 @@ def undefine_vm(domain): transaction.delete('/domains/{}/state'.format(dom_uuid)) transaction.delete('/domains/{}/hypervisor'.format(dom_uuid)) transaction.delete('/domains/{}/lasthypervisor'.format(dom_uuid)) + transaction.delete('/domains/{}/failedreason'.format(dom_uuid)) transaction.delete('/domains/{}/xml'.format(dom_uuid)) transaction.delete('/domains/{}'.format(dom_uuid)) transaction.commit()