pep8 cleanups
This commit is contained in:
parent
4a6db815b0
commit
c5cbec20d2
@ -52,7 +52,6 @@ flags.DEFINE_flag(flags.HelpshortFlag())
|
|||||||
flags.DEFINE_flag(flags.HelpXMLFlag())
|
flags.DEFINE_flag(flags.HelpXMLFlag())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# An example of an API that only exposes read-only methods.
|
# An example of an API that only exposes read-only methods.
|
||||||
# In this case we're just limiting which methods are exposed.
|
# In this case we're just limiting which methods are exposed.
|
||||||
class ReadOnlyCompute(direct.Limited):
|
class ReadOnlyCompute(direct.Limited):
|
||||||
|
@ -211,7 +211,8 @@ class ServiceWrapper(wsgi.Controller):
|
|||||||
try:
|
try:
|
||||||
return self._serialize(result, req.best_match_content_type())
|
return self._serialize(result, req.best_match_content_type())
|
||||||
except:
|
except:
|
||||||
raise exception.Error("returned non-serializable type: %s" % result)
|
raise exception.Error("returned non-serializable type: %s"
|
||||||
|
% result)
|
||||||
|
|
||||||
|
|
||||||
class Limited(object):
|
class Limited(object):
|
||||||
|
@ -608,7 +608,9 @@ class CloudController(object):
|
|||||||
if field in kwargs:
|
if field in kwargs:
|
||||||
changes[field] = kwargs[field]
|
changes[field] = kwargs[field]
|
||||||
if changes:
|
if changes:
|
||||||
self.volume_api.update(context, volume_id=volume_id, fields=changes)
|
self.volume_api.update(context,
|
||||||
|
volume_id=volume_id,
|
||||||
|
fields=changes)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def attach_volume(self, context, volume_id, instance_id, device, **kwargs):
|
def attach_volume(self, context, volume_id, instance_id, device, **kwargs):
|
||||||
|
@ -36,6 +36,7 @@ from nova.tests import test_cloud
|
|||||||
class ArbitraryObject(object):
|
class ArbitraryObject(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class FakeService(object):
|
class FakeService(object):
|
||||||
def echo(self, context, data):
|
def echo(self, context, data):
|
||||||
return {'data': data}
|
return {'data': data}
|
||||||
|
Loading…
Reference in New Issue
Block a user