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