[Kimchi-devel] [PATCH] [Kimchi 1/3] Issue #924: Add field to inform front-end if storage is in use

Jose Ricardo Ziviani joserz at linux.vnet.ibm.com
Fri Apr 15 22:43:42 UTC 2016


Signed-off-by: Jose Ricardo Ziviani <joserz at linux.vnet.ibm.com>
---
 control/storagepools.py | 3 ++-
 model/storagepools.py   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/control/storagepools.py b/control/storagepools.py
index aa7dbd3..714f4bb 100644
--- a/control/storagepools.py
+++ b/control/storagepools.py
@@ -113,7 +113,8 @@ class StoragePool(Resource):
                'type': self.info['type'],
                'nr_volumes': self.info['nr_volumes'],
                'autostart': self.info['autostart'],
-               'persistent': self.info['persistent']}
+               'persistent': self.info['persistent'],
+               'in_use': self.info['in_use']}
 
         val = self.info.get('task_id')
         if val:
diff --git a/model/storagepools.py b/model/storagepools.py
index 4a0d34c..be06988 100644
--- a/model/storagepools.py
+++ b/model/storagepools.py
@@ -357,7 +357,8 @@ class StoragePoolModel(object):
                'allocated': info[2],
                'available': info[3],
                'nr_volumes': nr_volumes,
-               'persistent': persistent}
+               'persistent': persistent,
+               'in_use': self._pool_used_by_template(name)}
 
         if not pool.isPersistent():
             # Deal with deep scan generated pool
-- 
1.9.1




More information about the Kimchi-devel mailing list