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

« back to all changes in this revision

Viewing changes to nova/tests/api/openstack/compute/contrib/test_hosts.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:
16
16
from lxml import etree
17
17
import webob.exc
18
18
 
 
19
from nova.api.openstack.compute.contrib import hosts as os_hosts
 
20
from nova.compute import power_state
 
21
from nova.compute import vm_states
19
22
from nova import context
20
23
from nova import db
21
24
from nova import exception
22
25
from nova import flags
23
26
from nova import log as logging
 
27
from nova.scheduler import rpcapi as scheduler_rpcapi
24
28
from nova import test
25
 
from nova.api.openstack.compute.contrib import hosts as os_hosts
26
 
from nova.compute import power_state
27
 
from nova.compute import vm_states
28
 
from nova.scheduler import api as scheduler_api
29
29
 
30
30
 
31
31
FLAGS = flags.FLAGS
38
38
        {"host_name": "host_v2", "service": "volume"}]
39
39
 
40
40
 
41
 
def stub_get_host_list(req):
 
41
def stub_get_host_list(self, req):
42
42
    return HOST_LIST
43
43
 
44
44
 
104
104
        super(HostTestCase, self).setUp()
105
105
        self.controller = os_hosts.HostController()
106
106
        self.req = FakeRequest()
107
 
        self.stubs.Set(scheduler_api, 'get_host_list', stub_get_host_list)
 
107
        self.stubs.Set(scheduler_rpcapi.SchedulerAPI, 'get_host_list',
 
108
                       stub_get_host_list)
108
109
        self.stubs.Set(self.controller.api, 'set_host_enabled',
109
110
                       stub_set_host_enabled)
110
111
        self.stubs.Set(self.controller.api, 'set_host_maintenance',