mirror of
https://opendev.org/openstack/python-heatclient.git
synced 2026-01-16 23:00:35 +00:00
Enable pep8 H405 tests
Enabled H405 multi line docstring summary not separated with an empty line in tox testing. Change-Id: I89d063133154ae343315872b677fa06cc901cf3b
This commit is contained in:
parent
b4690a2f80
commit
47cbec7ff5
13 changed files with 21 additions and 16 deletions
|
|
@ -51,8 +51,8 @@ def parse(env_str):
|
|||
|
||||
|
||||
def default_for_missing(env):
|
||||
'''Checks a parsed environment for missing sections.
|
||||
'''
|
||||
"""Checks a parsed environment for missing sections."""
|
||||
|
||||
for param in SECTIONS:
|
||||
if param not in env:
|
||||
env[param] = {}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ from tempest_lib.cli import base
|
|||
|
||||
class ClientTestBase(base.ClientTestBase):
|
||||
"""This is a first pass at a simple read only python-heatclient test.
|
||||
This only exercises client commands that are read only.
|
||||
|
||||
This only exercises client commands that are read only.
|
||||
This should test commands:
|
||||
* as a regular user
|
||||
* as a admin user
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ from heatclient.tests.functional import base
|
|||
|
||||
class SimpleReadOnlyHeatClientTest(base.ClientTestBase):
|
||||
"""Basic, read-only tests for Heat CLI client.
|
||||
|
||||
Basic smoke test for the heat CLI commands which do not require
|
||||
creating or modifying stacks.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class EventManager(stacks.StackChildManager):
|
|||
|
||||
def list(self, stack_id, resource_name=None, **kwargs):
|
||||
"""Get a list of events.
|
||||
|
||||
:param stack_id: ID of stack the events belong to
|
||||
:param resource_name: Optional name of resources to filter events by
|
||||
:rtype: list of :class:`Event`
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ class ResourceTypeManager(base.BaseManager):
|
|||
|
||||
def list(self, **kwargs):
|
||||
"""Get a list of resource types.
|
||||
|
||||
:rtype: list of :class:`ResourceType`
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ class ResourceManager(stacks.StackChildManager):
|
|||
|
||||
def list(self, stack_id, **kwargs):
|
||||
"""Get a list of resources.
|
||||
|
||||
:rtype: list of :class:`Resource`
|
||||
"""
|
||||
params = {}
|
||||
|
|
@ -112,9 +113,8 @@ class ResourceManager(stacks.StackChildManager):
|
|||
return body
|
||||
|
||||
def generate_template(self, resource_name):
|
||||
"""DEPRECATED! Use `generate_template` of `ResourceTypeManager`
|
||||
instead.
|
||||
"""
|
||||
"""Deprecated in favor of generate_template in ResourceTypeManager."""
|
||||
|
||||
url_str = '/resource_types/%s/template' % (
|
||||
parse.quote(encodeutils.safe_encode(resource_name), ''))
|
||||
resp = self.client.get(url_str)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ class ServiceManager(base.BaseManager):
|
|||
|
||||
def list(self):
|
||||
"""Get a list of services.
|
||||
|
||||
:rtype: list of :class:`Service`
|
||||
"""
|
||||
url = '/services'
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
|
||||
def _authenticated_fetcher(hc):
|
||||
"""A wrapper around the heat client object to fetch a template.
|
||||
"""
|
||||
"""A wrapper around the heat client object to fetch a template."""
|
||||
|
||||
def _do(*args, **kwargs):
|
||||
if isinstance(hc.http_client, http.SessionClient):
|
||||
method, url = args
|
||||
|
|
@ -1565,9 +1565,8 @@ def _do_stack_show(hc, fields):
|
|||
|
||||
|
||||
def _poll_for_events(hc, stack_name, action, poll_period):
|
||||
"""When an action is performed on a stack, continuously poll for its
|
||||
events and display to user as logs.
|
||||
"""
|
||||
"""Continuously poll events and logs for performed action on stack."""
|
||||
|
||||
fields = {'stack_id': stack_name}
|
||||
_do_stack_show(hc, fields)
|
||||
marker = None
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ class SoftwareConfigManager(base.BaseManager):
|
|||
|
||||
def list(self, **kwargs):
|
||||
"""Get a list of software configs.
|
||||
|
||||
:rtype: list of :class:`SoftwareConfig`
|
||||
"""
|
||||
qparams = {}
|
||||
|
|
|
|||
|
|
@ -32,14 +32,15 @@ class SoftwareDeploymentManager(base.BaseManager):
|
|||
|
||||
def list(self, **kwargs):
|
||||
"""Get a list of software deployments.
|
||||
|
||||
:rtype: list of :class:`SoftwareDeployment`
|
||||
"""
|
||||
url = '/software_deployments?%s' % parse.urlencode(kwargs)
|
||||
return self._list(url, "software_deployments")
|
||||
|
||||
def metadata(self, server_id):
|
||||
"""Get a grouped collection of software deployment metadata for a
|
||||
given server.
|
||||
"""Get a collection of software deployment metadata for given server.
|
||||
|
||||
:rtype: list of :class:`SoftwareDeployment`
|
||||
"""
|
||||
url = '/software_deployments/metadata/%s' % parse.quote(
|
||||
|
|
|
|||
|
|
@ -221,8 +221,7 @@ class StackManager(base.BaseManager):
|
|||
return Stack(self, body.get('stack'))
|
||||
|
||||
def template(self, stack_id):
|
||||
"""Get the template content for a specific stack as a parsed JSON
|
||||
object.
|
||||
"""Get template content for a specific stack as a parsed JSON object.
|
||||
|
||||
:param stack_id: Stack ID to get the template for
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ class TemplateVersionManager(base.BaseManager):
|
|||
|
||||
def list(self):
|
||||
"""Get a list of template versions.
|
||||
|
||||
:rtype: list of :class:`TemplateVersion`
|
||||
"""
|
||||
return self._list('/template_versions', 'template_versions')
|
||||
|
|
|
|||
2
tox.ini
2
tox.ini
|
|
@ -42,7 +42,7 @@ commands=
|
|||
downloadcache = ~/cache/pip
|
||||
|
||||
[flake8]
|
||||
ignore = E123,E126,E128,E241,E265,E713,H202,H405,H238
|
||||
ignore = E123,E126,E128,E241,E265,E713,H202,H238
|
||||
show-source = True
|
||||
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build
|
||||
max-complexity=20
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue