summaryrefslogtreecommitdiff
path: root/openstackclient/identity/v3/service.py
diff options
context:
space:
mode:
authorMohan Muppidi <mkumar2301@gmail.com>2016-02-28 09:43:44 +0000
committerMohan Muppidi <mkumar2301@gmail.com>2016-02-29 17:23:29 +0000
commit3d7430463c733e1dfcf8487ce955abd863f9f617 (patch)
tree59af01ecbe0ab537a34488ca96fa8fe264a5b4a4 /openstackclient/identity/v3/service.py
parent2819450be5d4fa57c6efdb4cd225f59bab894fba (diff)
downloadpython-openstackclient-3d7430463c733e1dfcf8487ce955abd863f9f617.tar.gz
take_action() method from command.Command shouldn't return
command.Command and command.Showone are base classes implemented in cliff framework. Showone extends Command to allow take_action() to return data to be formatted using a user-selectable formatter. Most of the classes which are extended from Command in openstackclient/identity/v3/ in some cases return data or return nothing where it is not necessary, this commit fixes most of them. Change-Id: I84c72ea4d6680f8bdbef5449316dd9a8af8c8286 Closes-Bug: 1550892
Diffstat (limited to 'openstackclient/identity/v3/service.py')
-rw-r--r--openstackclient/identity/v3/service.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/openstackclient/identity/v3/service.py b/openstackclient/identity/v3/service.py
index 42117c8d..355583cc 100644
--- a/openstackclient/identity/v3/service.py
+++ b/openstackclient/identity/v3/service.py
@@ -16,6 +16,7 @@
"""Identity v3 Service action implementations"""
import six
+import sys
from openstackclient.common import command
from openstackclient.common import utils
@@ -91,7 +92,6 @@ class DeleteService(command.Command):
service = common.find_service(identity_client, parsed_args.service)
identity_client.services.delete(service.id)
- return
class ListService(command.Lister):
@@ -166,10 +166,12 @@ class SetService(command.Command):
and not parsed_args.description
and not parsed_args.enable
and not parsed_args.disable):
+ sys.stderr.write("Incorrect set of arguments "
+ "provided. See openstack --help for more "
+ "details\n")
return
-
- service = common.find_service(identity_client, parsed_args.service)
-
+ service = common.find_service(identity_client,
+ parsed_args.service)
kwargs = {}
if parsed_args.type:
kwargs['type'] = parsed_args.type
@@ -186,7 +188,6 @@ class SetService(command.Command):
service.id,
**kwargs
)
- return
class ShowService(command.ShowOne):