Cleanse PEP8 error found so far

This commit is contained in:
tengqm 2015-01-26 23:04:32 +08:00
parent 152863ac7b
commit aab963cc91
8 changed files with 14 additions and 19 deletions

View File

@ -143,7 +143,7 @@ class NodeController(object):
action = self.rpc_client.node_delete(req.context, node_id, force=force,
cast=False)
if action:
return {'id': action['target'], 'action_id': action['id']}
return {'id': action['target'], 'action_id': action['id']}
raise exc.HTTPNoContent()

View File

@ -159,7 +159,6 @@ class Forbidden(SenlinException):
msg_fmt = _("You are not authorized to complete this action.")
#NOTE(bcwaldon): here for backwards-compatibility, need to deprecate.
class NotAuthorized(Forbidden):
msg_fmt = _("You are not authorized to complete this action.")

View File

@ -12,6 +12,7 @@
from senlin.drivers import base
class DriverHeatV1(base.DriverBase):
'''
Base class for Heat V1 drivers.

View File

@ -71,7 +71,7 @@ class DeletionPolicy(base.Policy):
return data
nodes = db_api.node_get_all_by_cluster(cluster_id)
# TODO: Add count check to ensure it is not larger
# TODO(anyone): Add count check to ensure it is not larger
# then the current size of cluster.
if count > len(nodes):
count = len(nodes)

View File

@ -1 +0,0 @@

View File

@ -10,9 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import uuid
from senlin.drivers import heat_v1 as heat
#from senlin.drivers import heat_v1 as heat
from senlin.profiles import base
__type_name__ = 'aws.autoscaling.launchconfig'
@ -38,7 +36,7 @@ class LaunchConfigProfile(base.Profile):
self.RamDiskId = kwargs.get('RamDiskId')
self.BlockDeviceMappings = kwargs.get('BlockDeviceMappings')
self.NovaSchedulerHings = kwargs.get('NovaSchedulerHints')
# new properties
self.InstanceMonitoring = kwargs.get('InstanceMonitoring')
self.SpotPrice = kwargs.get('SpotPrice')
@ -49,7 +47,7 @@ class LaunchConfigProfile(base.Profile):
'''
This method creates a YAML format Heat resource definition.
'''
return tmpl
return {}
def do_delete(self):
return True
@ -62,4 +60,4 @@ class LaunchConfigProfile(base.Profile):
def do_check(self, id):
#TODO(liuh): add actual checking logic
return True
return True

View File

@ -10,9 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import uuid
from senlin.drivers import heat_v1 as heat
#from senlin.drivers import heat_v1 as heat
from senlin.profiles import base
__type_name__ = 'os.heat.resource'
@ -32,17 +30,17 @@ class ResourceProfile(base.Profile):
A resource is represented as a YAML snippet that can be composed
into a Heat stack.
'''
return tmpl
return {}
def do_delete(self, id):
return True
return True
def do_update(self, ):
self.status = self.UPDATING
# TODO: do update
# TODO(anyone): do update
self.status = self.ACTIVE
return tmpl
return {}
def do_check(self, id):
#TODO(liuh): add actual checking logic
return True
return True

View File

@ -178,4 +178,4 @@ class StackProfile(base.Profile):
def do_check(self, id):
#TODO(liuh): add actual checking logic
return True
return True