summaryrefslogtreecommitdiff
path: root/heatclient
diff options
context:
space:
mode:
authorAngus Salkeld <asalkeld@redhat.com>2013-05-20 14:08:03 +1000
committerAngus Salkeld <asalkeld@redhat.com>2013-05-20 14:08:03 +1000
commit2a08054f8ce5b1ed00085a269cd1a62a8a7164b7 (patch)
tree0b1f52036c7958ea91191898beb421bb6a871d20 /heatclient
parentb343c1c22d1caa426d0afac1255ca92dcc72fa4b (diff)
downloadpython-heatclient-2a08054f8ce5b1ed00085a269cd1a62a8a7164b7.tar.gz
Fix some "H" pep errors
And be more specific about which ones we ignore. Change-Id: I69fd6897957e3dcb5939cf48651a0f1b41b711dd
Diffstat (limited to 'heatclient')
-rw-r--r--heatclient/common/http.py4
-rw-r--r--heatclient/exc.py22
-rw-r--r--heatclient/shell.py2
-rw-r--r--heatclient/v1/client.py2
-rw-r--r--heatclient/v1/shell.py42
-rw-r--r--heatclient/v1/stacks.py6
6 files changed, 39 insertions, 39 deletions
diff --git a/heatclient/common/http.py b/heatclient/common/http.py
index e759121..9cdf6db 100644
--- a/heatclient/common/http.py
+++ b/heatclient/common/http.py
@@ -121,7 +121,7 @@ class HTTPClient(object):
LOG.debug('\n'.join(dump))
def _http_request(self, url, method, **kwargs):
- """ Send an http request with the specified characteristics.
+ """Send an http request with the specified characteristics.
Wrapper around httplib.HTTP(S)Connection.request to handle tasks such
as setting headers and error handling.
@@ -256,7 +256,7 @@ class VerifiedHTTPSConnection(httplib.HTTPSConnection):
@staticmethod
def get_system_ca_file():
- """"Return path to system default CA file"""
+ """Return path to system default CA file."""
# Standard CA file locations for Debian/Ubuntu, RedHat/Fedora,
# Suse, FreeBSD/OpenBSD
ca_path = ['/etc/ssl/certs/ca-certificates.crt',
diff --git a/heatclient/exc.py b/heatclient/exc.py
index 7d32bc1..c90b0fc 100644
--- a/heatclient/exc.py
+++ b/heatclient/exc.py
@@ -23,7 +23,7 @@ class BaseException(Exception):
class CommandError(BaseException):
- """Invalid usage of CLI"""
+ """Invalid usage of CLI."""
class InvalidEndpoint(BaseException):
@@ -35,7 +35,7 @@ class CommunicationError(BaseException):
class HTTPException(BaseException):
- """Base exception for all HTTP-derived exceptions"""
+ """Base exception for all HTTP-derived exceptions."""
code = 'N/A'
@@ -50,7 +50,7 @@ class HTTPMultipleChoices(HTTPException):
class BadRequest(HTTPException):
- """DEPRECATED"""
+ """DEPRECATED."""
code = 400
@@ -59,7 +59,7 @@ class HTTPBadRequest(BadRequest):
class Unauthorized(HTTPException):
- """DEPRECATED"""
+ """DEPRECATED."""
code = 401
@@ -68,7 +68,7 @@ class HTTPUnauthorized(Unauthorized):
class Forbidden(HTTPException):
- """DEPRECATED"""
+ """DEPRECATED."""
code = 403
@@ -77,7 +77,7 @@ class HTTPForbidden(Forbidden):
class NotFound(HTTPException):
- """DEPRECATED"""
+ """DEPRECATED."""
code = 404
@@ -90,7 +90,7 @@ class HTTPMethodNotAllowed(HTTPException):
class Conflict(HTTPException):
- """DEPRECATED"""
+ """DEPRECATED."""
code = 409
@@ -99,7 +99,7 @@ class HTTPConflict(Conflict):
class OverLimit(HTTPException):
- """DEPRECATED"""
+ """DEPRECATED."""
code = 413
@@ -120,7 +120,7 @@ class HTTPBadGateway(HTTPException):
class ServiceUnavailable(HTTPException):
- """DEPRECATED"""
+ """DEPRECATED."""
code = 503
@@ -145,10 +145,10 @@ def from_response(response, body_iter):
class NoTokenLookupException(Exception):
- """DEPRECATED"""
+ """DEPRECATED."""
pass
class EndpointNotFound(Exception):
- """DEPRECATED"""
+ """DEPRECATED."""
pass
diff --git a/heatclient/shell.py b/heatclient/shell.py
index 3e6c72e..9c4ca64 100644
--- a/heatclient/shell.py
+++ b/heatclient/shell.py
@@ -21,9 +21,9 @@ import sys
from keystoneclient.v2_0 import client as ksclient
-from heatclient import exc
from heatclient import client as heatclient
from heatclient.common import utils
+from heatclient import exc
logger = logging.getLogger(__name__)
diff --git a/heatclient/v1/client.py b/heatclient/v1/client.py
index 2742728..f44208d 100644
--- a/heatclient/v1/client.py
+++ b/heatclient/v1/client.py
@@ -30,7 +30,7 @@ class Client(http.HTTPClient):
"""
def __init__(self, *args, **kwargs):
- """ Initialize a new client for the Heat v1 API. """
+ """Initialize a new client for the Heat v1 API."""
super(Client, self).__init__(*args, **kwargs)
self.stacks = stacks.StackManager(self)
self.resources = resources.ResourceManager(self)
diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py
index 9d7f0b4..736ae6a 100644
--- a/heatclient/v1/shell.py
+++ b/heatclient/v1/shell.py
@@ -58,7 +58,7 @@ def _set_template_fields(hc, args, fields):
@utils.arg('name', metavar='<STACK_NAME>',
help='Name of the stack to create.')
def do_create(hc, args):
- '''DEPRECATED! Use stack-create instead'''
+ '''DEPRECATED! Use stack-create instead.'''
do_stack_create(hc, args)
@@ -78,7 +78,7 @@ def do_create(hc, args):
@utils.arg('name', metavar='<STACK_NAME>',
help='Name of the stack to create.')
def do_stack_create(hc, args):
- '''Create the stack'''
+ '''Create the stack.'''
fields = {'stack_name': args.name,
'timeout_mins': args.create_timeout,
'disable_rollback': not(args.enable_rollback),
@@ -91,13 +91,13 @@ def do_stack_create(hc, args):
@utils.arg('id', metavar='<NAME or ID>', help='Name or ID of stack to delete.')
def do_delete(hc, args):
- '''DEPRECATED! Use stack-delete instead'''
+ '''DEPRECATED! Use stack-delete instead.'''
do_stack_delete(hc, args)
@utils.arg('id', metavar='<NAME or ID>', help='Name or ID of stack to delete.')
def do_stack_delete(hc, args):
- '''Delete the stack'''
+ '''Delete the stack.'''
fields = {'stack_id': args.id}
try:
hc.stacks.delete(**fields)
@@ -110,14 +110,14 @@ def do_stack_delete(hc, args):
@utils.arg('id', metavar='<NAME or ID>',
help='Name or ID of stack to describe.')
def do_describe(hc, args):
- '''DEPRECATED! Use stack-show instead'''
+ '''DEPRECATED! Use stack-show instead.'''
do_stack_show(hc, args)
@utils.arg('id', metavar='<NAME or ID>',
help='Name or ID of stack to describe.')
def do_stack_show(hc, args):
- '''Describe the stack'''
+ '''Describe the stack.'''
fields = {'stack_id': args.id}
try:
stack = hc.stacks.get(**fields)
@@ -149,7 +149,7 @@ def do_stack_show(hc, args):
@utils.arg('id', metavar='<NAME or ID>',
help='Name or ID of stack to update.')
def do_update(hc, args):
- '''DEPRECATED! Use stack-update instead'''
+ '''DEPRECATED! Use stack-update instead.'''
do_stack_update(hc, args)
@@ -164,7 +164,7 @@ def do_update(hc, args):
@utils.arg('id', metavar='<NAME or ID>',
help='Name or ID of stack to update.')
def do_stack_update(hc, args):
- '''Update the stack'''
+ '''Update the stack.'''
fields = {'stack_id': args.id,
'parameters': utils.format_parameters(args.parameters)}
_set_template_fields(hc, args, fields)
@@ -174,12 +174,12 @@ def do_stack_update(hc, args):
def do_list(hc, args={}):
- '''DEPRECATED! Use stack-list instead'''
+ '''DEPRECATED! Use stack-list instead.'''
do_stack_list(hc, args)
def do_stack_list(hc, args={}):
- '''List the user's stacks'''
+ '''List the user's stacks.'''
kwargs = {}
stacks = hc.stacks.list(**kwargs)
fields = ['id', 'stack_name', 'stack_status', 'creation_time']
@@ -189,14 +189,14 @@ def do_stack_list(hc, args={}):
@utils.arg('id', metavar='<NAME or ID>',
help='Name or ID of stack to get the template for.')
def do_gettemplate(hc, args):
- '''DEPRECATED! Use template-show instead'''
+ '''DEPRECATED! Use template-show instead.'''
do_template_show(hc, args)
@utils.arg('id', metavar='<NAME or ID>',
help='Name or ID of stack to get the template for.')
def do_template_show(hc, args):
- '''Get the template for the specified stack'''
+ '''Get the template for the specified stack.'''
fields = {'stack_id': args.id}
try:
template = hc.stacks.template(**fields)
@@ -215,7 +215,7 @@ def do_template_show(hc, args):
@utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
help='Parameter values to validate.')
def do_validate(hc, args):
- '''DEPRECATED! Use template-validate instead'''
+ '''DEPRECATED! Use template-validate instead.'''
do_template_validate(hc, args)
@@ -228,7 +228,7 @@ def do_validate(hc, args):
@utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
help='Parameter values to validate.')
def do_template_validate(hc, args):
- '''Validate a template with parameters'''
+ '''Validate a template with parameters.'''
fields = {'parameters': utils.format_parameters(args.parameters)}
_set_template_fields(hc, args, fields)
@@ -239,7 +239,7 @@ def do_template_validate(hc, args):
@utils.arg('id', metavar='<NAME or ID>',
help='Name or ID of stack to show the resources for.')
def do_resource_list(hc, args):
- '''Show list of resources belonging to a stack'''
+ '''Show list of resources belonging to a stack.'''
fields = {'stack_id': args.id}
try:
resources = hc.resources.list(**fields)
@@ -256,7 +256,7 @@ def do_resource_list(hc, args):
@utils.arg('resource', metavar='<RESOURCE>',
help='Name of the resource to show the details for.')
def do_resource(hc, args):
- '''DEPRECATED! Use resource-show instead'''
+ '''DEPRECATED! Use resource-show instead.'''
do_resource_show(hc, args)
@@ -265,7 +265,7 @@ def do_resource(hc, args):
@utils.arg('resource', metavar='<RESOURCE>',
help='Name of the resource to show the details for.')
def do_resource_show(hc, args):
- '''Describe the resource'''
+ '''Describe the resource.'''
fields = {'stack_id': args.id,
'resource_name': args.resource}
try:
@@ -287,7 +287,7 @@ def do_resource_show(hc, args):
@utils.arg('resource', metavar='<RESOURCE>',
help='Name of the resource to show the metadata for.')
def do_resource_metadata(hc, args):
- '''List resource metadata'''
+ '''List resource metadata.'''
fields = {'stack_id': args.id,
'resource_name': args.resource}
try:
@@ -304,7 +304,7 @@ def do_resource_metadata(hc, args):
@utils.arg('-r', '--resource', metavar='<RESOURCE>',
help='Name of the resource to filter events by')
def do_event_list(hc, args):
- '''List events for a stack'''
+ '''List events for a stack.'''
fields = {'stack_id': args.id,
'resource_name': args.resource}
try:
@@ -324,7 +324,7 @@ def do_event_list(hc, args):
@utils.arg('event', metavar='<EVENT>',
help='ID of event to display details for')
def do_event(hc, args):
- '''DEPRECATED! Use event-show instead'''
+ '''DEPRECATED! Use event-show instead.'''
do_event_show(hc, args)
@@ -335,7 +335,7 @@ def do_event(hc, args):
@utils.arg('event', metavar='<EVENT>',
help='ID of event to display details for')
def do_event_show(hc, args):
- '''Describe the event'''
+ '''Describe the event.'''
fields = {'stack_id': args.id,
'resource_name': args.resource,
'event_id': args.event}
diff --git a/heatclient/v1/stacks.py b/heatclient/v1/stacks.py
index 27d6466..565de94 100644
--- a/heatclient/v1/stacks.py
+++ b/heatclient/v1/stacks.py
@@ -81,12 +81,12 @@ class StackManager(base.Manager):
return paginate(params)
def create(self, **kwargs):
- """Create a stack"""
+ """Create a stack."""
resp, body = self.api.json_request(
'POST', '/stacks', body=kwargs)
def update(self, **kwargs):
- """Update a stack"""
+ """Update a stack."""
stack_id = kwargs.pop('stack_id')
resp, body = self.api.json_request(
'PUT', '/stacks/%s' % stack_id, body=kwargs)
@@ -114,7 +114,7 @@ class StackManager(base.Manager):
return body
def validate(self, **kwargs):
- """Validate a stack template"""
+ """Validate a stack template."""
resp, body = self.api.json_request(
'POST', '/validate', body=kwargs)
return body