~gandelman-a/ubuntu/precise/nova/UCA_2012.2.1

« back to all changes in this revision

Viewing changes to nova/tests/scheduler/test_filter_scheduler.py

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman, Adam Gandelman, Chuck Short
  • Date: 2012-08-27 15:37:18 UTC
  • mfrom: (1.1.60)
  • Revision ID: package-import@ubuntu.com-20120827153718-lj8er44eqqz1gsrj
Tags: 2012.2~rc1~20120827.15815-0ubuntu1
[ Adam Gandelman ]
* New upstream release.

[ Chuck Short ]
* debian/patches/0001-Update-tools-hacking-for-pep8-1.2-and-
  beyond.patch: Dropped we dont run pep8 tests anymore.
* debian/control: Drop pep8 build depends
* debian/*.upstart.in: Make sure we transition correctly from runlevel
  1 to 2. (LP: #820694)

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
        # instance 1
120
120
        self.driver._provision_resource(
121
121
            ctxt, 'host1',
122
 
            mox.Func(_has_launch_index(0)), None,
123
 
            {}, None, None, None, None).AndReturn(instance1)
 
122
            mox.Func(_has_launch_index(0)), {},
 
123
            None, None, None, None, reservations=None).AndReturn(instance1)
124
124
        # instance 2
125
125
        self.driver._provision_resource(
126
126
            ctxt, 'host2',
127
 
            mox.Func(_has_launch_index(1)), None,
128
 
            {}, None, None, None, None).AndReturn(instance2)
 
127
            mox.Func(_has_launch_index(1)), {},
 
128
            None, None, None, None, reservations=None).AndReturn(instance2)
129
129
        self.mox.ReplayAll()
130
130
 
131
131
        self.driver.schedule_run_instance(context_fake, request_spec,
203
203
        self.assertEquals(weight, -1.0)
204
204
        hostinfo = host_manager.HostState('host', 'compute')
205
205
        hostinfo.update_from_compute_node(dict(memory_mb=1000,
206
 
                local_gb=0, vcpus=1))
 
206
                local_gb=0, vcpus=1, free_disk_gb=1000, free_ram_mb=1000,
 
207
                vcpus_used=0))
207
208
        self.assertEquals(1000 - 128, fn(hostinfo, {}))
208
209
 
209
210
    def test_max_attempts(self):