39aedaf745
Refactoring neutron security grp config opts to be in neutron/conf/agent so that all the configuration options reside in a centralized location. This simplifies the process of looking up the config opts and provides an easy way to import. Change-Id: Ia9538f41dfd894ed55c1db1556b37aad09ad2ae1 Partial-Bug: #1563069
45 lines
1.5 KiB
Python
45 lines
1.5 KiB
Python
# Copyright 2012, Nachi Ueno, NTT MCL, Inc.
|
|
# All Rights Reserved.
|
|
#
|
|
# 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 neutron._i18n import _
|
|
|
|
|
|
security_group_opts = [
|
|
cfg.StrOpt(
|
|
'firewall_driver',
|
|
help=_('Driver for security groups firewall in the L2 agent')),
|
|
cfg.BoolOpt(
|
|
'enable_security_group',
|
|
default=True,
|
|
help=_(
|
|
'Controls whether the neutron security group API is enabled '
|
|
'in the server. It should be false when using no security '
|
|
'groups or using the nova security group API.')),
|
|
cfg.BoolOpt(
|
|
'enable_ipset',
|
|
default=True,
|
|
help=_('Use ipset to speed-up the iptables based security groups. '
|
|
'Enabling ipset support requires that ipset is installed on L2 '
|
|
'agent node.'))
|
|
]
|
|
|
|
|
|
def register_securitygroups_opts(cfg=cfg.CONF):
|
|
cfg.register_opts(security_group_opts, 'SECURITYGROUP')
|