Add block name to switch config options for MLX plug-ins.

In the INI files, the switch_names option uses a dynamic
value to determine the block names for the switch options.
In order to create proper config option reference docs,
there needs to be an example block name for the switch
options.

Change-Id: Ic5bf6de02ba1b7d1bc90ee29a5a0570fb45b9956
Closes-Bug: #1442357
This commit is contained in:
Angela Smith 2015-04-09 16:55:35 -04:00
parent 3d205937de
commit 594353722c
4 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@
# Example:
# switch_names = mlx
# [EXAMPLE_SWITCH]
[L3_BROCADE_MLX_EXAMPLE]
# address = The IP address of the MLX switch
# username = The SSH username to use to connect to device
# password = The SSH password to use to connect to device

View File

@ -3,7 +3,7 @@
# Example:
# switch_names = icx-1, icx-2
# [switch-name-1]
[ML2_BROCADE_MLX_EXAMPLE]
# address = The address of the host to SSH to
# username = The username to use to connect to device
# password = The password to use to connect to device

View File

@ -41,10 +41,10 @@ ML2_BROCADE = [cfg.StrOpt('address', default='',
help=('OS type of the device.')),
]
cfg.CONF.register_opts(SWITCHES, 'ml2_brocade_fi_ni')
cfg.CONF.register_opts(ML2_BROCADE, 'ML2_BROCADE_MLX_EXAMPLE')
class BrocadeFiNiMechanism(mechanism_brocade_fi_ni.BrocadeFiNiMechanism):
def __init__(self):
self._switch_names = cfg.CONF.ml2_brocade_fi_ni.switch_names
switches = [x.strip() for x in self._switch_names.split(',')]

View File

@ -39,6 +39,7 @@ L3_BROCADE = [cfg.StrOpt('address', default='',
'configured on the switch')),
]
cfg.CONF.register_opts(SWITCHES, 'l3_brocade_mlx')
cfg.CONF.register_opts(L3_BROCADE, 'L3_BROCADE_MLX_EXAMPLE')
class BrocadeRouterPlugin(plugin.BrocadeRouterPlugin):