]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Use VERSION var for volume_stats version (Gluster/NFS)
authorEric Harney <eharney@redhat.com>
Fri, 12 Apr 2013 20:47:34 +0000 (16:47 -0400)
committerEric Harney <eharney@redhat.com>
Fri, 12 Apr 2013 21:20:59 +0000 (17:20 -0400)
Establish a formal version number to help with maintenance.

Change-Id: Iffe1a6f809ec9385c7407efac25ca39eff0d1329

cinder/volume/drivers/glusterfs.py
cinder/volume/drivers/nfs.py

index 5d1aced24f49ca3ef7e0dbd7182f77e710844ba0..17252bf0768583cba634e3abbd22425ffdc3ca5c 100644 (file)
@@ -42,6 +42,7 @@ volume_opts = [
                 help=('Create volumes as sparsed files which take no space.'
                       'If set to False volume is created as regular file.'
                       'In such case volume creation takes a lot of time.'))]
+VERSION = '1.0'
 
 FLAGS = flags.FLAGS
 FLAGS.register_opts(volume_opts)
@@ -271,7 +272,7 @@ class GlusterfsDriver(nfs.RemoteFsDriver):
         backend_name = self.configuration.safe_get('volume_backend_name')
         data['volume_backend_name'] = backend_name or 'GlusterFS'
         data['vendor_name'] = 'Open Source'
-        data['driver_version'] = '1.0'
+        data['driver_version'] = VERSION
         data['storage_protocol'] = 'glusterfs'
 
         self._ensure_shares_mounted()
index 9939fcfecd027b3fff5bc4ca46e1d2cd7dab592a..67b9d6abd0c000e47305bf545faea10886db0407 100755 (executable)
@@ -48,6 +48,8 @@ volume_opts = [
                     'of the nfs man page for details'),
 ]
 
+VERSION = '1.0'
+
 
 class RemoteFsDriver(driver.VolumeDriver):
     """Common base for drivers that work like NFS."""
@@ -340,7 +342,7 @@ class NfsDriver(RemoteFsDriver):
         backend_name = self.configuration.safe_get('volume_backend_name')
         data["volume_backend_name"] = backend_name or 'Generic_NFS'
         data["vendor_name"] = 'Open Source'
-        data["driver_version"] = '1.0'
+        data["driver_version"] = VERSION
         data["storage_protocol"] = 'nfs'
 
         self._ensure_shares_mounted()