Fix all method errors for custom guidelines

There are several method error raised during custom
guidelines check. Need to fix it for successful running
pep8.

implements bp custom-guidelines

Change-Id: I55883bb8d314f982161aaa21c010e9d1467bf903
This commit is contained in:
Peter Razumovsky 2016-02-18 15:41:04 +03:00
parent e4dc942ce1
commit 753f4c65e2
7 changed files with 10 additions and 10 deletions

View File

@ -100,7 +100,7 @@ class Restarter(signal_responder.SignalResponder):
def _resolve_attribute(self, name):
"""Resolves the resource's attributes.
heat extension: "AlarmUrl" returns the url to post to the policy
Heat extension: "AlarmUrl" returns the url to post to the policy
when there is an alarm.
"""
if name == self.ALARM_URL and self.resource_id is not None:

View File

@ -373,7 +373,7 @@ class InstanceGroup(stack_resource.StackResource):
def _resolve_attribute(self, name):
"""Resolves the resource's attributes.
heat extension: "InstanceList" returns comma delimited list of server
Heat extension: "InstanceList" returns comma delimited list of server
ip addresses.
"""
if name == self.INSTANCE_LIST:

View File

@ -334,7 +334,7 @@ class ResourceGroup(stack_resource.StackResource):
size)
def _count_black_listed(self):
"""Return the number of current resource names that are blacklisted"""
"""Return the number of current resource names that are blacklisted."""
existing_members = grouputils.get_member_names(self)
return len(self._name_blacklist() & set(existing_members))

View File

@ -470,12 +470,12 @@ class Port(neutron.NeutronResource):
return super(Port, self)._resolve_attribute(name)
def needs_replace(self, after_props):
"""Mandatory replace based on props """
"""Mandatory replace based on props."""
return after_props.get(self.REPLACEMENT_POLICY) == 'REPLACE_ALWAYS'
def needs_replace_with_prop_diff(self, changed_properties_set,
after_props, before_props):
"""Needs replace based on prop_diff """
"""Needs replace based on prop_diff."""
# Switching between name and ID is OK, provided the value resolves
# to the same network. If the network changes, port is replaced.
if self.NETWORK in changed_properties_set:

View File

@ -1062,7 +1062,7 @@ class Server(stack_user.StackUser, sh.SchedulerHintsMixin,
def needs_replace_with_prop_diff(self, changed_properties_set,
after_props, before_props):
"""Needs replace based on prop_diff """
"""Needs replace based on prop_diff."""
if self.FLAVOR in changed_properties_set:
flavor_update_policy = (
after_props.get(self.FLAVOR_UPDATE_POLICY) or

View File

@ -61,7 +61,7 @@ class HeatCustomGuidelines(object):
self._check_resource_schemas(cls, cls.attributes_schema,
'attribute')
# check methods descriptions
#self._check_resource_methods(cls)
self._check_resource_methods(cls)
def _check_resource_description(self, resource):
description = resource.__doc__