config options: Centralise 'virt.firewall' options

Add options from 'virt.firewall'. These options are part of the
'DEFAULT' group but are included in the "nova.conf.virt" file in hope
that they can eventually be moved to their own group.

Change-Id: I54d7bbe416d908edf3447b36e054be189f9d5bf9
Implements: bp centralize-config-options
This commit is contained in:
Stephen Finucane 2016-01-14 10:40:38 +00:00
parent 853b697afa
commit 6537213ddd
3 changed files with 14 additions and 14 deletions

View File

@ -182,6 +182,16 @@ Interdependencies to other options:
* None
""")
firewall_driver = cfg.StrOpt(
'firewall_driver',
help='Firewall driver '
'(defaults to hypervisor specific iptables driver)')
allow_same_net_traffic = cfg.BoolOpt(
'allow_same_net_traffic',
default=True,
help='Whether to allow network traffic from same network')
force_raw_images = cfg.BoolOpt(
'force_raw_images',
default=True,
@ -208,6 +218,8 @@ ALL_OPTS = [vcpu_pin_set,
use_cow_images,
vif_plugging_is_fatal,
vif_plugging_timeout,
firewall_driver,
allow_same_net_traffic,
force_raw_images]

View File

@ -15,11 +15,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import importutils
from nova.compute import utils as compute_utils
import nova.conf
from nova import context
from nova.i18n import _LI
from nova.network import linux_net
@ -29,17 +29,7 @@ from nova.virt import netutils
LOG = logging.getLogger(__name__)
firewall_opts = [
cfg.StrOpt('firewall_driver',
help='Firewall driver '
'(defaults to hypervisor specific iptables driver)'),
cfg.BoolOpt('allow_same_net_traffic',
default=True,
help='Whether to allow network traffic from same network'),
]
CONF = cfg.CONF
CONF.register_opts(firewall_opts)
CONF = nova.conf.CONF
CONF.import_opt('use_ipv6', 'nova.netconf')

View File

@ -17,7 +17,6 @@ import nova.virt.configdrive
import nova.virt.disk.api
import nova.virt.disk.mount.nbd
import nova.virt.disk.vfs.guestfs
import nova.virt.firewall
import nova.virt.hyperv.pathutils
import nova.virt.hyperv.vif
import nova.virt.hyperv.vmops
@ -55,7 +54,6 @@ def list_opts():
nova.virt.configdrive.configdrive_opts,
nova.virt.disk.api.disk_opts,
nova.virt.disk.mount.nbd.nbd_opts,
nova.virt.firewall.firewall_opts,
nova.virt.imagecache.imagecache_opts,
nova.virt.netutils.netutils_opts,
)),