Enable oslo-config-generator to generate a sample

A sample nova_powervm configuration file can be generated with
the oslo tooling via:

oslo-config-generator --namespace nova_powervm > sample.conf

The output file will contain all the nova_powervm configuration
options.  The file can be edited and then copy-n-pasted into the
full nova.conf file.

Change-Id: Iacc3a3ec9e7b00275ba192b5b9b07e346da6fbbf
This commit is contained in:
Kyle L. Henderson 2016-01-18 09:02:27 -06:00
parent f4f47699c3
commit 537514c744
3 changed files with 23 additions and 7 deletions

View File

@ -1,5 +1,5 @@
..
Copyright 2015 IBM
Copyright 2015, 2016 IBM
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -35,7 +35,7 @@ configured ahead of time.
Configuration File Options
--------------------------
The standard nova configuration options are supported. Additionally, a
[powervm] section is used to provide additional customization to the driver.
``[powervm]`` section is used to provide additional customization to the driver.
By default, no additional inputs are needed. The base configuration allows for
a Nova driver to support ephemeral disks to a local volume group (only
@ -44,11 +44,17 @@ hosted disks via Cinder will use the Virtual SCSI connections through the
Virtual I/O Servers.
Operators may change the disk driver (nova based disks - NOT Cinder) via the
disk_driver property.
``disk_driver`` property.
All of these values are under the [powervm] section. The tables are broken
All of these values are under the ``[powervm]`` section. The tables are broken
out into logical sections.
To generate a sample config file for ``[powervm]`` run::
oslo-config-generator --namespace nova_powervm > nova_powervm_sample.conf
The ``[powervm]`` section of the sample can then be edited and pasted into the
full nova.conf file.
VM Processor Options
~~~~~~~~~~~~~~~~~~~~

View File

@ -179,7 +179,13 @@ def register_opts(conf):
_register_fabrics(conf, NPIV_FABRIC_WWPNS)
# list_opts is called by the nova sample creation tooling. It's not used for
# powervm for now.
# To generate a sample config run:
# $ oslo-config-generator --namespace nova_powervm > nova_powervm_sample.conf
def list_opts():
return {powervm_group.name: STATIC_OPTIONS + fabric_sample}
# The nova conf tooling expects each module to return a dict of options.
# When powervm is pulled into nova proper the return value would be in
# this form:
# return {powervm_group.name: STATIC_OPTIONS + fabric_sample}
#
# The oslo-config-generator tooling expects a tuple:
return [(powervm_group.name, STATIC_OPTIONS + fabric_sample)]

View File

@ -42,3 +42,7 @@ input_file = nova_powervm/locale/nova-powervm.pot
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = nova_powervm/locale/nova-powervm.pot
[entry_points]
oslo.config.opts =
nova_powervm = nova_powervm.conf.powervm:list_opts