]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_volume_client: add versioning
authorRamana Raja <rraja@redhat.com>
Wed, 6 Jul 2016 10:03:06 +0000 (15:33 +0530)
committerRamana Raja <rraja@redhat.com>
Mon, 18 Jul 2016 11:08:32 +0000 (16:38 +0530)
Add class attributes to CephFSVolumeClient to version
its capabilities.

'version' attribute stores the current version number
of CephFSVolumeClient.

'compat_version' attribute stores the earliest version
number of CephFSVolumeClient that the current version is
compatible with.

Fixes: http://tracker.ceph.com/issues/15406
Signed-off-by: Ramana Raja <rraja@redhat.com>
src/pybind/ceph_volume_client.py

index 7110aae01c6d5bbfcd440b0b62b80063f8b8d3a9..d738992da9a64c33141298206ee73d1a59cc92a4 100644 (file)
@@ -199,6 +199,15 @@ class CephFSVolumeClientError(Exception):
     pass
 
 
+CEPHFSVOLUMECLIENT_VERSION_HISTORY = """
+
+    CephFSVolumeClient Version History:
+
+    * 1 - Initial version
+
+"""
+
+
 class CephFSVolumeClient(object):
     """
     Combine libcephfs and librados interfaces to implement a
@@ -218,6 +227,11 @@ class CephFSVolumeClient(object):
     or cephfs.Error exceptions in unexpected situations.
     """
 
+    # Current version
+    version = 1
+    # Earliest compatible version
+    compat_version = 1
+
     # Where shall we create our volumes?
     POOL_PREFIX = "fsvolume_"
     DEFAULT_VOL_PREFIX = "/volumes"