summaryrefslogtreecommitdiff
path: root/openstackclient/identity/v2_0/endpoint.py
diff options
context:
space:
mode:
authorJosh Kearney <josh@jk0.org>2013-01-31 13:31:41 -0600
committerJosh Kearney <josh@jk0.org>2013-01-31 13:31:41 -0600
commitb26cb5bf683e7f4f03d9704524a188b76ac5e9b9 (patch)
treef059ddb3b7e15f50d722cf1fbd2b0eaf8242b1a4 /openstackclient/identity/v2_0/endpoint.py
parentaa4f12aec1d13d02df2ecc2710d85ebd90d6dfe7 (diff)
downloadpython-openstackclient-b26cb5bf683e7f4f03d9704524a188b76ac5e9b9.tar.gz
Upgraded to PEP8 1.3.3 to stay aligned with Nova, etc.
Made all the necessary changes to pass new PEP8 standards. Also cleaned up docstrings to conform to the HACKING stanards. Change-Id: Ib8df3030da7a7885655689ab5da0717748c9edbe
Diffstat (limited to 'openstackclient/identity/v2_0/endpoint.py')
-rw-r--r--openstackclient/identity/v2_0/endpoint.py26
1 files changed, 11 insertions, 15 deletions
diff --git a/openstackclient/identity/v2_0/endpoint.py b/openstackclient/identity/v2_0/endpoint.py
index f9c689ec..4ce4fcb2 100644
--- a/openstackclient/identity/v2_0/endpoint.py
+++ b/openstackclient/identity/v2_0/endpoint.py
@@ -13,9 +13,7 @@
# under the License.
#
-"""
-Endpoint action implementations
-"""
+"""Endpoint action implementations"""
import logging
@@ -61,15 +59,14 @@ class CreateEndpoint(show.ShowOne):
def take_action(self, parsed_args):
self.log.debug('take_action(%s)' % parsed_args)
identity_client = self.app.client_manager.identity
- service = utils.find_resource(
- identity_client.services, parsed_args.service)
+ service = utils.find_resource(identity_client.services,
+ parsed_args.service)
endpoint = identity_client.endpoints.create(
parsed_args.region,
service.id,
parsed_args.publicurl,
parsed_args.adminurl,
- parsed_args.internalurl,
- )
+ parsed_args.internalurl,)
info = {}
info.update(endpoint._info)
@@ -119,7 +116,7 @@ class ListEndpoint(lister.Lister):
identity_client = self.app.client_manager.identity
if parsed_args.long:
columns = ('ID', 'Region', 'Service Name', 'Service Type',
- 'PublicURL', 'AdminURL', 'InternalURL')
+ 'PublicURL', 'AdminURL', 'InternalURL')
else:
columns = ('ID', 'Region', 'Service Name', 'Service Type')
data = identity_client.endpoints.list()
@@ -133,8 +130,7 @@ class ListEndpoint(lister.Lister):
(utils.get_item_properties(
s, columns,
formatters={},
- ) for s in data),
- )
+ ) for s in data))
class ShowEndpoint(show.ShowOne):
@@ -154,7 +150,7 @@ class ShowEndpoint(show.ShowOne):
metavar='<endpoint-type>',
default='publicURL',
help='Endpoint type: publicURL, internalURL, adminURL ' +
- '(default publicURL)')
+ '(default publicURL)')
parser.add_argument(
'--attr',
metavar='<endpoint-attribute>',
@@ -196,8 +192,8 @@ class ShowEndpoint(show.ShowOne):
# The Identity 2.0 API doesn't support retrieving a single
# endpoint so we have to do this ourselves
try:
- service = utils.find_resource(
- identity_client.services, parsed_args.service)
+ service = utils.find_resource(identity_client.services,
+ parsed_args.service)
except exceptions.CommandError:
try:
# search for service type
@@ -215,8 +211,8 @@ class ShowEndpoint(show.ShowOne):
if ep.service_id == service.id:
info = {}
info.update(ep._info)
- service = utils.find_resource(
- identity_client.services, ep.service_id)
+ service = utils.find_resource(identity_client.services,
+ ep.service_id)
info['service_name'] = service.name
info['service_type'] = service.type
return zip(*sorted(info.iteritems()))