diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2013-01-08 08:13:12 +0000 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2013-01-09 08:15:43 +0000 |
| commit | 39a46f48bfcaae1ca4500ba145c1c08c6bf009f1 (patch) | |
| tree | e6c6ea5637c8d1d2fc90b93cdce345ad71a0d6f2 /nova/virt | |
| parent | 41ef13a34c4fa41052ae72cc87e552dfd8ed91ba (diff) | |
Move vpn_image_id to pipelib
Apart from checking whether a given image is the cloudpipe image, the
vpn_image_id option is only used within pipelib itself.
Add a is_vpn_image() helper method and move the option into pipelib.
Some rejiggering of how pipelib imports ec2 opts is required to avoid
circular imports.
blueprint: scope-config-opts
Change-Id: Ie984b2bb81681c24d3cee803082960083992a535
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/libvirt/firewall.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/virt/libvirt/firewall.py b/nova/virt/libvirt/firewall.py index a818d65d4..4cb75c118 100644 --- a/nova/virt/libvirt/firewall.py +++ b/nova/virt/libvirt/firewall.py @@ -20,6 +20,7 @@ from eventlet import tpool +from nova.cloudpipe import pipelib from nova.openstack.common import cfg from nova.openstack.common import log as logging import nova.virt.firewall as base_firewall @@ -27,7 +28,6 @@ import nova.virt.firewall as base_firewall LOG = logging.getLogger(__name__) CONF = cfg.CONF CONF.import_opt('use_ipv6', 'nova.config') -CONF.import_opt('vpn_image_id', 'nova.config') try: import libvirt @@ -117,7 +117,7 @@ class NWFilterFirewall(base_firewall.FirewallDriver): if mapping['dhcp_server']: allow_dhcp = True break - if instance['image_ref'] == str(CONF.vpn_image_id): + if pipelib.is_vpn_image(instance['image_ref']): base_filter = 'nova-vpn' elif allow_dhcp: base_filter = 'nova-base' |
