[Kimchi-devel] [PATCH] [Kimchi] Do not break the logging of failed requests

Lucio Correia luciojhc at linux.vnet.ibm.com
Wed Jun 8 19:25:32 UTC 2016


Now that failed requests are also logged, this fix is
necessary to avoid breaking the logging itself due to
lack of parameters.

Signed-off-by: Lucio Correia <luciojhc at linux.vnet.ibm.com>
---
 control/storagevolumes.py | 1 +
 control/vm/ifaces.py      | 1 +
 control/vms.py            | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/control/storagevolumes.py b/control/storagevolumes.py
index c3f1c29..c121b5e 100644
--- a/control/storagevolumes.py
+++ b/control/storagevolumes.py
@@ -46,6 +46,7 @@ class StorageVolumes(AsyncCollection):
         self.model_args = [self.pool, ]
         self.log_map = STORAGEVOLUMES_REQUESTS
         self.log_args.update({
+            'name': '',
             'pool': self.pool.encode('utf-8') if self.pool else '',
         })
 
diff --git a/control/vm/ifaces.py b/control/vm/ifaces.py
index 0cea8b5..7e133a6 100644
--- a/control/vm/ifaces.py
+++ b/control/vm/ifaces.py
@@ -47,6 +47,7 @@ class VMIfaces(Collection):
         self.model_args = [self.vm, ]
         self.log_map = VMIFACES_REQUESTS
         self.log_args.update({
+            'network': '',
             'vm': self.vm.encode('utf-8') if self.vm else '',
         })
 
diff --git a/control/vms.py b/control/vms.py
index 2339017..b351c72 100644
--- a/control/vms.py
+++ b/control/vms.py
@@ -55,7 +55,7 @@ class VMs(AsyncCollection):
         self.role_key = 'guests'
         self.admin_methods = ['POST']
         self.log_map = VMS_REQUESTS
-        self.log_args.update({'name': ''})
+        self.log_args.update({'name': '', 'template': ''})
 
 
 class VM(Resource):
-- 
1.9.1




More information about the Kimchi-devel mailing list