Merge "Enable oslo-config-generator to generate a sample"

This commit is contained in:
Jenkins
2016-01-19 19:46:25 +00:00
committed by Gerrit Code Review
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

@@ -187,7 +187,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