fix pep8 issues
This commit is contained in:
parent
9ebab74220
commit
91b4918241
@ -39,7 +39,6 @@ class ViewBuilder(object):
|
|||||||
|
|
||||||
def build(self, credential_data, is_detail=False):
|
def build(self, credential_data, is_detail=False):
|
||||||
"""Generic method used to generate a credential entity."""
|
"""Generic method used to generate a credential entity."""
|
||||||
|
|
||||||
if is_detail:
|
if is_detail:
|
||||||
credential = self._build_detail(credential_data)
|
credential = self._build_detail(credential_data)
|
||||||
else:
|
else:
|
||||||
@ -52,7 +51,6 @@ class ViewBuilder(object):
|
|||||||
|
|
||||||
def _build_detail(self, credential_data):
|
def _build_detail(self, credential_data):
|
||||||
"""Return a detailed description of credential."""
|
"""Return a detailed description of credential."""
|
||||||
|
|
||||||
return dict(credential=dict(id=credential_data['credential_id'],
|
return dict(credential=dict(id=credential_data['credential_id'],
|
||||||
name=credential_data['user_name'],
|
name=credential_data['user_name'],
|
||||||
password=credential_data['password']))
|
password=credential_data['password']))
|
||||||
|
@ -39,7 +39,6 @@ class ViewBuilder(object):
|
|||||||
|
|
||||||
def build(self, portprofile_data, is_detail=False):
|
def build(self, portprofile_data, is_detail=False):
|
||||||
"""Generic method used to generate a portprofile entity."""
|
"""Generic method used to generate a portprofile entity."""
|
||||||
|
|
||||||
if is_detail:
|
if is_detail:
|
||||||
portprofile = self._build_detail(portprofile_data)
|
portprofile = self._build_detail(portprofile_data)
|
||||||
else:
|
else:
|
||||||
|
@ -119,7 +119,6 @@ class NovatenantsController(common.QuantumController):
|
|||||||
def schedule_host(self, request, tenant_id, id):
|
def schedule_host(self, request, tenant_id, id):
|
||||||
content_type = request.best_match_content_type()
|
content_type = request.best_match_content_type()
|
||||||
print "Content type:%s" % content_type
|
print "Content type:%s" % content_type
|
||||||
|
|
||||||
try:
|
try:
|
||||||
req_params = \
|
req_params = \
|
||||||
self._parse_request_params(request,
|
self._parse_request_params(request,
|
||||||
@ -127,10 +126,10 @@ class NovatenantsController(common.QuantumController):
|
|||||||
except exc.HTTPError as exp:
|
except exc.HTTPError as exp:
|
||||||
return faults.Fault(exp)
|
return faults.Fault(exp)
|
||||||
instance_id = req_params['instance_id']
|
instance_id = req_params['instance_id']
|
||||||
|
|
||||||
instance_desc = req_params['instance_desc']
|
instance_desc = req_params['instance_desc']
|
||||||
try:
|
try:
|
||||||
host = self._plugin.schedule_host(tenant_id, instance_id, instance_desc)
|
host = self._plugin.\
|
||||||
|
schedule_host(tenant_id, instance_id, instance_desc)
|
||||||
builder = novatenant_view.get_view_builder(request)
|
builder = novatenant_view.get_view_builder(request)
|
||||||
result = builder.build_host(host)
|
result = builder.build_host(host)
|
||||||
return result
|
return result
|
||||||
@ -140,7 +139,6 @@ class NovatenantsController(common.QuantumController):
|
|||||||
def associate_port(self, request, tenant_id, id):
|
def associate_port(self, request, tenant_id, id):
|
||||||
content_type = request.best_match_content_type()
|
content_type = request.best_match_content_type()
|
||||||
print "Content type:%s" % content_type
|
print "Content type:%s" % content_type
|
||||||
|
|
||||||
try:
|
try:
|
||||||
req_params = \
|
req_params = \
|
||||||
self._parse_request_params(request,
|
self._parse_request_params(request,
|
||||||
@ -148,7 +146,6 @@ class NovatenantsController(common.QuantumController):
|
|||||||
except exc.HTTPError as exp:
|
except exc.HTTPError as exp:
|
||||||
return faults.Fault(exp)
|
return faults.Fault(exp)
|
||||||
instance_id = req_params['instance_id']
|
instance_id = req_params['instance_id']
|
||||||
|
|
||||||
instance_desc = req_params['instance_desc']
|
instance_desc = req_params['instance_desc']
|
||||||
try:
|
try:
|
||||||
vif = self._plugin. \
|
vif = self._plugin. \
|
||||||
|
@ -199,7 +199,6 @@ class PortprofilesController(common.QuantumController):
|
|||||||
""" Disassociate a portprofile from a port """
|
""" Disassociate a portprofile from a port """
|
||||||
content_type = request.best_match_content_type()
|
content_type = request.best_match_content_type()
|
||||||
print "Content type:%s" % content_type
|
print "Content type:%s" % content_type
|
||||||
|
|
||||||
try:
|
try:
|
||||||
req_params = \
|
req_params = \
|
||||||
self._parse_request_params(request,
|
self._parse_request_params(request,
|
||||||
|
Loading…
Reference in New Issue
Block a user