diff options
| author | sunyajing <yajing.sun@easystack.cn> | 2016-06-14 15:44:41 +0800 |
|---|---|---|
| committer | Steve Martinelli <s.martinelli@gmail.com> | 2016-06-17 04:20:28 +0000 |
| commit | 8a12a39ece3882af56b42898ffee0d537c96edc8 (patch) | |
| tree | 035553e001193a212fb55d51877585371cd3d16e /openstackclient/image | |
| parent | 2c92b60f457a16c315b6286592e9fee534bd4b3d (diff) | |
| download | python-openstackclient-8a12a39ece3882af56b42898ffee0d537c96edc8.tar.gz | |
Make set/unset command in identity and image pass normally when nothing specified
Also update its unit tests.
Change-Id: I82b90658b0d4247cdc9a650f14aceda640a32059
Partial-bug: #1588588
Diffstat (limited to 'openstackclient/image')
| -rw-r--r-- | openstackclient/image/v2/image.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py index 62f7bee8..47ba6493 100644 --- a/openstackclient/image/v2/image.py +++ b/openstackclient/image/v2/image.py @@ -803,11 +803,6 @@ class SetImage(command.Command): parsed_args.project_domain, ).id - # Checks if anything that requires getting the image - if not (kwargs or parsed_args.deactivate or parsed_args.activate): - msg = _("No arguments specified") - raise exceptions.CommandError(msg) - image = utils.find_resource( image_client.images, parsed_args.image) @@ -819,10 +814,6 @@ class SetImage(command.Command): image_client.images.reactivate(image.id) activation_status = "activated" - # Check if need to do the actual update - if not kwargs: - return {}, {} - if parsed_args.tags: # Tags should be extended, but duplicates removed kwargs['tags'] = list(set(image.tags).union(set(parsed_args.tags))) @@ -895,10 +886,6 @@ class UnsetImage(command.Command): parsed_args.image, ) - if not (parsed_args.tags or parsed_args.properties): - msg = _("No arguments specified") - raise exceptions.CommandError(msg) - kwargs = {} tagret = 0 propret = 0 |
