]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixes Opt types in cinder/backup/drivers/ceph.py
authorZhongyue Luo <zhongyue.nah@intel.com>
Wed, 17 Jul 2013 05:26:23 +0000 (14:26 +0900)
committerZhongyue Luo <zhongyue.nah@intel.com>
Wed, 17 Jul 2013 05:30:32 +0000 (14:30 +0900)
Changed backup_ceph_chunk_size, backup_ceph_stripe_unit and
backup_ceph_stripe_count from StrOpt to IntOpt.

Change-Id: I30a0b4d905b41f00e6450bc5cbfbf0c4d8593ab3

cinder/backup/drivers/ceph.py

index ee9575f5caaed51a32d728e035954d2d90b6a3a9..7b56b7a0ebd2aacc08a66aecff6e3983dc945dff 100644 (file)
@@ -41,14 +41,14 @@ service_opts = [
                help='Ceph config file to use.'),
     cfg.StrOpt('backup_ceph_user', default='cinder',
                help='the Ceph user to connect with'),
-    cfg.StrOpt('backup_ceph_chunk_size', default=(units.MiB * 128),
+    cfg.IntOpt('backup_ceph_chunk_size', default=(units.MiB * 128),
                help='the chunk size in bytes that a backup will be broken '
                     'into before transfer to backup store'),
     cfg.StrOpt('backup_ceph_pool', default='backups',
                help='the Ceph pool to backup to'),
-    cfg.StrOpt('backup_ceph_stripe_unit', default=0,
+    cfg.IntOpt('backup_ceph_stripe_unit', default=0,
                help='RBD stripe unit to use when creating a backup image'),
-    cfg.StrOpt('backup_ceph_stripe_count', default=0,
+    cfg.IntOpt('backup_ceph_stripe_count', default=0,
                help='RBD stripe count to use when creating a backup image')
 ]
 
@@ -66,8 +66,8 @@ class CephBackupDriver(BackupDriver):
         self.context = context
         self.chunk_size = CONF.backup_ceph_chunk_size
         if self._supports_stripingv2():
-            self.rbd_stripe_unit = int(CONF.backup_ceph_stripe_unit)
-            self.rbd_stripe_count = int(CONF.backup_ceph_stripe_count)
+            self.rbd_stripe_unit = CONF.backup_ceph_stripe_unit
+            self.rbd_stripe_count = CONF.backup_ceph_stripe_count
         else:
             LOG.info("rbd striping not supported - ignoring conf settings "
                      "for rbd striping")