Merge "Fix all method errors for custom guidelines"

This commit is contained in:
Jenkins 2016-02-29 02:43:31 +00:00 committed by Gerrit Code Review
commit c045d4146b
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

@ -177,7 +177,7 @@ class ResourceChain(stack_resource.StackResource):
:type resource_type: str
:param depends_on: if specified, the new resource will depend on the
resource name specified
:type depends_on: str
:type depends_on: str
:return: resource definition suitable for adding to a template
:rtype: heat.engine.rsrc_defn.ResourceDefinition
"""

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))
@ -442,9 +442,9 @@ class ResourceGroup(stack_resource.StackResource):
:param include_all: if False, only properties for the resource
definition that are not empty will be included
:type include_all: bool
:type include_all: bool
:return: resource definition for the group
:rtype: dict
:rtype: dict
"""
# At this stage, we don't mind if all of the parameters have values

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__