Merge "Fix hosts extension and enable its tests"
This commit is contained in:
commit
602da5b06b
cinder
@ -19,9 +19,9 @@ import webob.exc
|
||||
from xml.dom import minidom
|
||||
from xml.parsers import expat
|
||||
|
||||
from cinder.api.openstack import extensions
|
||||
from cinder.api import extensions
|
||||
from cinder.api.openstack import wsgi
|
||||
from cinder.api.openstack import xmlutil
|
||||
from cinder.api import xmlutil
|
||||
from cinder import db
|
||||
from cinder import exception
|
||||
from cinder import flags
|
||||
@ -206,7 +206,7 @@ class HostController(object):
|
||||
try:
|
||||
host_ref = db.service_get_by_host_and_topic(context,
|
||||
host,
|
||||
'cinder-volume')
|
||||
FLAGS.volume_topic)
|
||||
except exception.ServiceNotFound:
|
||||
raise webob.exc.HTTPNotFound(explanation=_("Host not found"))
|
||||
|
||||
|
@ -278,7 +278,7 @@ def service_get_by_host_and_topic(context, host, topic):
|
||||
filter_by(topic=topic).\
|
||||
first()
|
||||
if not result:
|
||||
raise exception.ServiceNotFound(host=host, topic=topic)
|
||||
raise exception.ServiceNotFound(service_id=None)
|
||||
return result
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@ import datetime
|
||||
from lxml import etree
|
||||
import webob.exc
|
||||
|
||||
from cinder.api.openstack.volume.contrib import hosts as os_hosts
|
||||
from cinder.api.contrib import hosts as os_hosts
|
||||
from cinder import context
|
||||
from cinder import db
|
||||
from cinder import flags
|
Loading…
x
Reference in New Issue
Block a user