]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Coho volume stats update
authorBardia Keyoumarsi <bardia.keyoumarsi@cohodata.com>
Fri, 12 Feb 2016 20:06:25 +0000 (12:06 -0800)
committerBardia Keyoumarsi <bardia.keyoumarsi@cohodata.com>
Mon, 15 Feb 2016 09:07:44 +0000 (01:07 -0800)
Return better driver volume statistics.

Change-Id: I643922703f993d4a65ba01afa0b2680a23456e77

cinder/volume/drivers/coho.py

index 0b2c3f8fbd4181e3a06a4d75bdf9857a3f7695ab..f9e8630a7d22efb58a7db28ad4345be1d2ff0be4 100644 (file)
@@ -290,7 +290,6 @@ class CohoDriver(nfs.NfsDriver):
     def __init__(self, *args, **kwargs):
         super(CohoDriver, self).__init__(*args, **kwargs)
         self.configuration.append_config_values(coho_opts)
-        self._execute_as_root = True
         self._rpcclients = dict()
         self._backend_name = (self.configuration.volume_backend_name or
                               self.__class__.__name__)
@@ -308,6 +307,7 @@ class CohoDriver(nfs.NfsDriver):
     def do_setup(self, context):
         """Any initialization the volume driver does while starting."""
         super(CohoDriver, self).do_setup(context)
+        self._execute_as_root = True
         self._context = context
 
         config = self.configuration.coho_rpc_port
@@ -393,5 +393,8 @@ class CohoDriver(nfs.NfsDriver):
         _stats["driver_version"] = VERSION
         _stats["storage_protocol"] = 'NFS'
         _stats["volume_backend_name"] = self._backend_name
+        _stats["total_capacity_gb"] = 'unknown'
+        _stats["free_capacity_gb"] = 'unknown'
+        _stats["export_paths"] = self._mounted_shares
 
         return _stats