f37eb0fc58
Adds a configuration option [iptables]ip_version to specify the desired ip version for the iptables pxe filter, which can be set to 4 or 6. When set to 6, the iptables pxe filter will use ip6tables command to manage rules for the port 547 which is the port of DHCPv6 server side. The string type is used to make room for the future, when there is need to automatically determine ip version from the binding interface. Change-Id: I7de2be5950a23def3ec6490f2e6dfa3d5c42798a Story: 1756012 Task: 11411
52 lines
1.9 KiB
Python
52 lines
1.9 KiB
Python
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
# implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
from oslo_config import cfg
|
|
|
|
from ironic_inspector.common.i18n import _
|
|
|
|
|
|
_OPTS = [
|
|
cfg.StrOpt('dnsmasq_interface',
|
|
default='br-ctlplane',
|
|
help=_('Interface on which dnsmasq listens, the default is for '
|
|
'VM\'s.')),
|
|
cfg.StrOpt('firewall_chain',
|
|
default='ironic-inspector',
|
|
help=_('iptables chain name to use.')),
|
|
cfg.ListOpt('ethoib_interfaces',
|
|
default=[],
|
|
help=_('List of Etherent Over InfiniBand interfaces '
|
|
'on the Inspector host which are used for physical '
|
|
'access to the DHCP network. Multiple interfaces would '
|
|
'be attached to a bond or bridge specified in '
|
|
'dnsmasq_interface. The MACs of the InfiniBand nodes '
|
|
'which are not in desired state are going to be '
|
|
'blacklisted based on the list of neighbor MACs '
|
|
'on these interfaces.')),
|
|
cfg.StrOpt('ip_version',
|
|
default='4',
|
|
choices=[('4', _('IPv4')),
|
|
('6', _('IPv6'))],
|
|
help=_('The IP version that will be used for iptables filter. '
|
|
'Defaults to 4.')),
|
|
]
|
|
|
|
|
|
def register_opts(conf):
|
|
conf.register_opts(_OPTS, 'iptables')
|
|
|
|
|
|
def list_opts():
|
|
return _OPTS
|