]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Reference default_servicetype group in lowercase
authorMark McLoughlin <markmc@redhat.com>
Tue, 18 Jun 2013 10:44:06 +0000 (11:44 +0100)
committerMark McLoughlin <markmc@redhat.com>
Tue, 18 Jun 2013 20:05:35 +0000 (21:05 +0100)
commit8a6143e145f3ed46ef3d723e83c9f4f4a5447729
treeba8d570856ce5c5cdf792145387653f8d96b20fb
parentfd7223bcd4709fcaaf103fb5f0f14e90ca3f00d7
Reference default_servicetype group in lowercase

Now that we require oslo-config-1.2.0, we can start referencing group
names as lowercase. Let's start with the default_servicetype group.

We do this simply by changing the case of the group name passed to
register_opt():

  -cfg.CONF.register_opts(..., 'DEFAULT_SERVICETYPE')
  +cfg.CONF.register_opts(..., 'default_servicetype')

and this means that all options in the group now need to be referenced
using the lowercase group name i.e.

  -svc_defs = cfg.CONF.DEFAULT_SERVICETYPE.service_definition
  +svc_defs = cfg.CONF.default_servicetype.service_definition

Note however, users can still use the uppercase section name for
backwards compatibility.

When we last attempted to do this, oslo.config-1.2.0 wasn't actually
being installed correctly so add a unit test which verifies that both
uppercase and lowercase section names work.

Change-Id: I9357397f39d8f7d0d4f445b78aae5665c7ece3d4
quantum/db/servicetype_db.py
quantum/tests/unit/test_servicetype.py