~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to nova/virt/firewall.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-02-10 11:25:38 UTC
  • mto: This revision was merged to the branch mainline in revision 65.
  • Revision ID: package-import@ubuntu.com-20120210112538-3jcp8w9huic41e45
Tags: upstream-2012.1~e4~20120210.12574
ImportĀ upstreamĀ versionĀ 2012.1~e4~20120210.12574

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#    License for the specific language governing permissions and limitations
18
18
#    under the License.
19
19
 
20
 
from nova.common import cfg
21
20
from nova import context
22
21
from nova import db
23
22
from nova import flags
24
23
from nova import log as logging
 
24
from nova.openstack.common import cfg
25
25
from nova import utils
26
26
from nova.virt import netutils
27
27
 
28
28
 
29
29
LOG = logging.getLogger("nova.virt.firewall")
30
30
 
31
 
allow_same_net_traffic_opt = \
32
 
    cfg.BoolOpt('allow_same_net_traffic',
33
 
                default=True,
34
 
                help='Whether to allow network traffic from same network')
 
31
allow_same_net_traffic_opt = cfg.BoolOpt('allow_same_net_traffic',
 
32
        default=True,
 
33
        help='Whether to allow network traffic from same network')
35
34
 
36
35
FLAGS = flags.FLAGS
37
36
FLAGS.add_option(allow_same_net_traffic_opt)
135
134
        self.instances[instance['id']] = instance
136
135
        self.network_infos[instance['id']] = network_info
137
136
        self.add_filters_for_instance(instance)
138
 
        LOG.debug(_('Filters added to the instance: %r'), instance)
 
137
        LOG.debug(_('Filters added to instance %s'), instance['uuid'])
139
138
        self.refresh_provider_fw_rules()
140
139
        LOG.debug(_('Provider Firewall Rules refreshed'))
141
140
        self.iptables.apply()