~ubuntu-branches/ubuntu/raring/nova/raring-proposed

« back to all changes in this revision

Viewing changes to nova/virt/firewall.py

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman
  • Date: 2013-08-09 10:12:27 UTC
  • mto: This revision was merged to the branch mainline in revision 107.
  • Revision ID: package-import@ubuntu.com-20130809101227-flqfubhwpot76pob
Tags: upstream-2013.1.3
ImportĀ upstreamĀ versionĀ 2013.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
from oslo.config import cfg
21
21
 
22
 
from nova import conductor
 
22
from nova.compute import utils as compute_utils
23
23
from nova import context
24
 
from nova import network
25
24
from nova.network import linux_net
26
25
from nova.openstack.common import importutils
27
26
from nova.openstack.common import lockutils
409
408
                    fw_rules += [' '.join(args)]
410
409
                else:
411
410
                    if rule['grantee_group']:
412
 
                        # FIXME(jkoelker) This needs to be ported up into
413
 
                        #                 the compute manager which already
414
 
                        #                 has access to a nw_api handle,
415
 
                        #                 and should be the only one making
416
 
                        #                 making rpc calls.
417
 
                        nw_api = network.API()
418
 
                        capi = conductor.API()
419
411
                        for instance in rule['grantee_group']['instances']:
420
 
                            nw_info = nw_api.get_instance_nw_info(
421
 
                                ctxt,
422
 
                                instance,
423
 
                                conductor_api=capi)
 
412
                            nw_info = compute_utils.get_nw_info_for_instance(
 
413
                                    instance)
424
414
 
425
415
                            ips = [ip['address']
426
416
                                for ip in nw_info.fixed_ips()