From 594353722ccba27d19c693c2f77905758e46223a Mon Sep 17 00:00:00 2001 From: Angela Smith Date: Thu, 9 Apr 2015 16:55:35 -0400 Subject: [PATCH] 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 --- etc/neutron/plugins/brocade/brocade_mlx.ini | 2 +- etc/neutron/plugins/ml2/ml2_conf_brocade_fi_ni.ini | 2 +- .../ml2/drivers/brocade/fi_ni/mechanism_brocade_fi_ni.py | 2 +- neutron/services/l3_router/brocade/mlx/l3_router_plugin.py | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/etc/neutron/plugins/brocade/brocade_mlx.ini b/etc/neutron/plugins/brocade/brocade_mlx.ini index 54d541422..3e1e3387f 100644 --- a/etc/neutron/plugins/brocade/brocade_mlx.ini +++ b/etc/neutron/plugins/brocade/brocade_mlx.ini @@ -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 diff --git a/etc/neutron/plugins/ml2/ml2_conf_brocade_fi_ni.ini b/etc/neutron/plugins/ml2/ml2_conf_brocade_fi_ni.ini index 887ccf5ab..b37fa43fc 100644 --- a/etc/neutron/plugins/ml2/ml2_conf_brocade_fi_ni.ini +++ b/etc/neutron/plugins/ml2/ml2_conf_brocade_fi_ni.ini @@ -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 diff --git a/neutron/plugins/ml2/drivers/brocade/fi_ni/mechanism_brocade_fi_ni.py b/neutron/plugins/ml2/drivers/brocade/fi_ni/mechanism_brocade_fi_ni.py index d8c7dc4d7..433319204 100644 --- a/neutron/plugins/ml2/drivers/brocade/fi_ni/mechanism_brocade_fi_ni.py +++ b/neutron/plugins/ml2/drivers/brocade/fi_ni/mechanism_brocade_fi_ni.py @@ -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(',')] diff --git a/neutron/services/l3_router/brocade/mlx/l3_router_plugin.py b/neutron/services/l3_router/brocade/mlx/l3_router_plugin.py index 87f1e59c2..85e5d2d3b 100644 --- a/neutron/services/l3_router/brocade/mlx/l3_router_plugin.py +++ b/neutron/services/l3_router/brocade/mlx/l3_router_plugin.py @@ -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): -- 2.45.2