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

« back to all changes in this revision

Viewing changes to nova/scheduler/filters/affinity_filter.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-09-09 13:11:11 UTC
  • mfrom: (1.1.74)
  • Revision ID: package-import@ubuntu.com-20130909131111-aw02ice50wac9tma
Tags: 1:2013.2~b3-0ubuntu1
* New usptream release. 
* debian/patches/avoid_requirements_cheetah.patch: Dropped
* debian/patches/fix-sqlalchemy-0.7.9-usage.patch: Dropped
* debian/patches/fix-requirements.patch: Refreshed.
* debian/patches/path-to-the-xenhost.conf-fixup.patch: Refreshed
* debian/control: Add python-jinja2
* debian/control: Dropped python-cheetah

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import netaddr
19
19
 
20
20
from nova.compute import api as compute
 
21
from nova.openstack.common.gettextutils import _
21
22
from nova.openstack.common import log as logging
22
23
from nova.scheduler import filters
23
24
 
86
87
 
87
88
        affinity_cidr = scheduler_hints.get('cidr', '/24')
88
89
        affinity_host_addr = scheduler_hints.get('build_near_host_ip')
89
 
        host_ip = host_state.capabilities.get('host_ip')
 
90
        host_ip = host_state.host_ip
90
91
        if affinity_host_addr:
91
92
            affinity_net = netaddr.IPNetwork(str.join('', (affinity_host_addr,
92
93
                                                           affinity_cidr)))