summaryrefslogtreecommitdiff
path: root/openstackclient/identity/v3
diff options
context:
space:
mode:
authorwanghong <w.wanghong@huawei.com>2014-08-12 19:29:21 +0800
committerwanghong <w.wanghong@huawei.com>2014-08-14 20:11:00 +0800
commit2dc060cff3b3f85582347d70eb594b1570e0dc7d (patch)
tree296b3c09aed98f96d4839888d47b9a6610432000 /openstackclient/identity/v3
parentf0b077eb7063d51790b207a78280206bebe63eb3 (diff)
downloadpython-openstackclient-2dc060cff3b3f85582347d70eb594b1570e0dc7d.tar.gz
add tests for identity v3 domain
Change-Id: I478215f62b51e6e73283f0304ea1b0736177d1b1
Diffstat (limited to 'openstackclient/identity/v3')
-rw-r--r--openstackclient/identity/v3/domain.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/openstackclient/identity/v3/domain.py b/openstackclient/identity/v3/domain.py
index f9763847..49397afc 100644
--- a/openstackclient/identity/v3/domain.py
+++ b/openstackclient/identity/v3/domain.py
@@ -135,13 +135,12 @@ class SetDomain(command.Command):
'--enable',
dest='enabled',
action='store_true',
- default=True,
help='Enable domain (default)',
)
enable_group.add_argument(
'--disable',
- dest='enabled',
- action='store_false',
+ dest='disabled',
+ action='store_true',
help='Disable domain',
)
return parser
@@ -156,8 +155,10 @@ class SetDomain(command.Command):
kwargs['name'] = parsed_args.name
if parsed_args.description:
kwargs['description'] = parsed_args.description
- if 'enabled' in parsed_args:
- kwargs['enabled'] = parsed_args.enabled
+ if parsed_args.enabled:
+ kwargs['enabled'] = True
+ if parsed_args.disabled:
+ kwargs['enabled'] = False
if not kwargs:
sys.stdout.write("Domain not updated, no arguments present")