]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
LVM / Block Device Drivers: Fix duplicated flags
authorEmilien Macchi <emilien.macchi@enovance.com>
Wed, 31 Jul 2013 14:47:37 +0000 (16:47 +0200)
committerEmilien Macchi <emilien.macchi@enovance.com>
Wed, 31 Jul 2013 15:53:26 +0000 (17:53 +0200)
- Import in lvm driver the duplicated flags from block_device driver.
- Register volume_opts in block_device drivers

Fix bug #1206944

Change-Id: Icb2c9411be060065ecf5efed293bacd6b735e299

cinder/volume/drivers/block_device.py
cinder/volume/drivers/lvm.py

index b94be1bf37a6a5bea5a1bf0816c64e30b9a367bd..f4edbaa9479dbfdeb9f7c4e911fe37fb710420d5 100644 (file)
@@ -43,6 +43,9 @@ volume_opts = [
                     'none, zero, shred)'),
 ]
 
+CONF = cfg.CONF
+CONF.register_opts(volume_opts)
+
 
 class BlockDeviceDriver(driver.ISCSIDriver):
     VERSION = '1.0'
index 5dcd3656dd896ba4baf974f2f477cce63b067ffa..961a1a054791687e27b906da855f98c7a0a9ce89 100644 (file)
@@ -42,13 +42,6 @@ volume_opts = [
     cfg.StrOpt('volume_group',
                default='cinder-volumes',
                help='Name for the VG that will contain exported volumes'),
-    cfg.StrOpt('volume_clear',
-               default='zero',
-               help='Method used to wipe old volumes (valid options are: '
-                    'none, zero, shred)'),
-    cfg.IntOpt('volume_clear_size',
-               default=0,
-               help='Size in MiB to wipe at start of old volumes. 0 => all'),
     cfg.StrOpt('pool_size',
                default=None,
                help='Size of thin provisioning pool '
@@ -61,6 +54,8 @@ volume_opts = [
 
 CONF = cfg.CONF
 CONF.register_opts(volume_opts)
+CONF.import_opt('volume_clear', 'cinder.volume.drivers.block_device')
+CONF.import_opt('volume_clear_size', 'cinder.volume.drivers.block_device')
 
 
 class LVMVolumeDriver(driver.VolumeDriver):