]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix cinder.conf.sample generation
authorKazumasa Nomura <kazumasa.nomura.rx@hitachi.com>
Thu, 25 Jun 2015 18:33:16 +0000 (03:33 +0900)
committerKazumasa Nomura <kazumasa.nomura.rx@hitachi.com>
Mon, 29 Jun 2015 12:47:27 +0000 (12:47 +0000)
commitb3c6764918064bea53d1f1fce712893652c94350
treeea5980cdb24cc3b56c2c3840c5d4eda421dfb558
parentdc9a8c8f5d369eb121053fcdc362648e219d968f
Fix cinder.conf.sample generation

Introduction of the hp_xp driver broke cinder.conf.sample generation due to
the way the driver was registering the configuration items. Originally the
options were being included into the FC driver file and registered there.
When the config generator found the options in the separate hp_xp_opts.py
file it did not know what group to include the options in since they were
not registered at all.

This fix moves registration of the options to the hp_xp_opts.py file so
that the config generation will work. Since cfg.CONF is a global, the
hp_xp driver will still have access to the options in there after they are
set by importing the opts file. An additional problem that was uncovered
when creating this fix is the fact that the old config generator we are
using from oslo-incubator doesn't support using cfg.Opt. To temporarily
workaround this I have changed the cfg.Opts to be cfg.IntOpts or
cfg.ListOpts(as appropriate) and documented the valid values for those
options.

The last change that was necessary was to add config values for several of
the options in cinder/tests.py as the options were marked as required by
the driver. If values were not set this caused oslo config to error out
reporting that they values needed to be set.

Change-Id: Ie47d38c2f8fde675cf00ea2ec9abf60691c57ef9
Closes-Bug: 1466198
Signed-off-by: Jay S. Bryant<jsbryant@us.ibm.com>,
               Kazumasa Nomura <kazumasa.nomura.rx@hitachi.com>
cinder/volume/drivers/san/hp/hp_xp_fc.py
cinder/volume/drivers/san/hp/hp_xp_opts.py