~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/virt/libvirt/firewall.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-05-24 13:12:53 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20120524131253-ommql08fg1en06ut
Tags: 2012.2~f1-0ubuntu1
* New upstream release.
* Prepare for quantal:
  - Dropped debian/patches/upstream/0006-Use-project_id-in-ec2.cloud._format_image.patch
  - Dropped debian/patches/upstream/0005-Populate-image-properties-with-project_id-again.patch
  - Dropped debian/patches/upstream/0004-Fixed-bug-962840-added-a-test-case.patch
  - Dropped debian/patches/upstream/0003-Allow-unprivileged-RADOS-users-to-access-rbd-volumes.patch
  - Dropped debian/patches/upstream/0002-Stop-libvirt-test-from-deleting-instances-dir.patch
  - Dropped debian/patches/upstream/0001-fix-bug-where-nova-ignores-glance-host-in-imageref.patch 
  - Dropped debian/patches/0001-fix-useexisting-deprecation-warnings.patch
* debian/control: Add python-keystone as a dependency. (LP: #907197)
* debian/patches/kombu_tests_timeout.patch: Refreshed.
* debian/nova.conf, debian/nova-common.postinst: Convert to new ini
  file configuration
* debian/patches/nova-manage_flagfile_location.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
        LOG.info(_('Ensuring static filters'), instance=instance)
102
102
        self._ensure_static_filters()
103
103
 
 
104
        allow_dhcp = False
 
105
        for (network, mapping) in network_info:
 
106
            if mapping['dhcp_server']:
 
107
                allow_dhcp = True
 
108
                break
104
109
        if instance['image_ref'] == str(FLAGS.vpn_image_id):
105
110
            base_filter = 'nova-vpn'
 
111
        elif allow_dhcp:
 
112
            base_filter = 'nova-base'
106
113
        else:
107
 
            base_filter = 'nova-base'
 
114
            base_filter = 'nova-nodhcp'
108
115
 
109
116
        for (network, mapping) in network_info:
110
117
            nic_id = mapping['mac'].replace(':', '')
128
135
                                                    'no-ip-spoofing',
129
136
                                                    'no-arp-spoofing',
130
137
                                                    'allow-dhcp-server']))
 
138
        self._define_filter(self._filter_container('nova-nodhcp',
 
139
                                                   ['no-mac-spoofing',
 
140
                                                    'no-ip-spoofing',
 
141
                                                    'no-arp-spoofing']))
131
142
        self._define_filter(self._filter_container('nova-vpn',
132
143
                                                   ['allow-dhcp-server']))
133
144
        self._define_filter(self.nova_dhcp_filter)