Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/nova/api/openstack/compute/contrib/hosts.py b/nova/api/openstack/compute/contrib/hosts.py
- index 202c8ca..6685b24 100644
- --- a/nova/api/openstack/compute/contrib/hosts.py
- +++ b/nova/api/openstack/compute/contrib/hosts.py
- @@ -22,7 +22,7 @@ from xml.parsers import expat
- from nova.api.openstack import wsgi
- from nova.api.openstack import xmlutil
- from nova.api.openstack import extensions
- -from nova.compute import api as compute_api
- +from nova import compute
- from nova import db
- from nova import exception
- from nova import flags
- @@ -122,7 +122,7 @@ def check_host(fn):
- class HostController(object):
- """The Hosts API controller for the OpenStack API."""
- def __init__(self):
- - self.api = compute_api.HostAPI()
- + self.api = compute.HostAPI()
- super(HostController, self).__init__()
- @wsgi.serializers(xml=HostIndexTemplate)
- diff --git a/nova/compute/__init__.py b/nova/compute/__init__.py
- index 3dab6bf..d8ecc5d 100644
- --- a/nova/compute/__init__.py
- --- a/nova/compute/__init__.py
- +++ b/nova/compute/__init__.py
- @@ -22,3 +22,4 @@ import nova.flags
- import nova.utils
- API = nova.utils.import_class(nova.flags.FLAGS.compute_api_class)
- +HostAPI = nova.utils.import_class(nova.flags.FLAGS.compute_hostapi_class)
- diff --git a/nova/flags.py b/nova/flags.py
- index 652d346..e7e54ae 100644
- --- a/nova/flags.py
- +++ b/nova/flags.py
- @@ -455,6 +455,9 @@ global_opts = [
- cfg.StrOpt('compute_api_class',
- default='nova.compute.api.API',
- help='The full class name of the compute API class to use'),
- + cfg.StrOpt('compute_hostapi_class',
- + default='nova.compute.api.HostAPI',
- + help='The full class name of the compute HostAPI class to use'),
- cfg.StrOpt('network_api_class',
- default='nova.network.api.API',
- help='The full class name of the network API class to use'),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement