Advertisement
Guest User

Untitled

a guest
Aug 31st, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.92 KB | None | 0 0
  1. diff --git a/nova/api/openstack/compute/contrib/hosts.py b/nova/api/openstack/compute/contrib/hosts.py
  2. index 202c8ca..6685b24 100644
  3. --- a/nova/api/openstack/compute/contrib/hosts.py
  4. +++ b/nova/api/openstack/compute/contrib/hosts.py
  5. @@ -22,7 +22,7 @@ from xml.parsers import expat
  6.  from nova.api.openstack import wsgi
  7.  from nova.api.openstack import xmlutil
  8.  from nova.api.openstack import extensions
  9. -from nova.compute import api as compute_api
  10. +from nova import compute
  11.  from nova import db
  12.  from nova import exception
  13.  from nova import flags
  14. @@ -122,7 +122,7 @@ def check_host(fn):
  15.  class HostController(object):
  16.      """The Hosts API controller for the OpenStack API."""
  17.      def __init__(self):
  18. -        self.api = compute_api.HostAPI()
  19. +        self.api = compute.HostAPI()
  20.          super(HostController, self).__init__()
  21.  
  22.      @wsgi.serializers(xml=HostIndexTemplate)
  23. diff --git a/nova/compute/__init__.py b/nova/compute/__init__.py
  24. index 3dab6bf..d8ecc5d 100644
  25. --- a/nova/compute/__init__.py
  26. --- a/nova/compute/__init__.py
  27. +++ b/nova/compute/__init__.py
  28. @@ -22,3 +22,4 @@ import nova.flags
  29.  import nova.utils
  30.  
  31.  API = nova.utils.import_class(nova.flags.FLAGS.compute_api_class)
  32. +HostAPI = nova.utils.import_class(nova.flags.FLAGS.compute_hostapi_class)
  33. diff --git a/nova/flags.py b/nova/flags.py
  34. index 652d346..e7e54ae 100644
  35. --- a/nova/flags.py
  36. +++ b/nova/flags.py
  37. @@ -455,6 +455,9 @@ global_opts = [
  38.      cfg.StrOpt('compute_api_class',
  39.                  default='nova.compute.api.API',
  40.                  help='The full class name of the compute API class to use'),
  41. +    cfg.StrOpt('compute_hostapi_class',
  42. +                default='nova.compute.api.HostAPI',
  43. +                help='The full class name of the compute HostAPI class to use'),
  44.      cfg.StrOpt('network_api_class',
  45.                  default='nova.network.api.API',
  46.                  help='The full class name of the network API class to use'),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement