From 2672e37ee211bf08a4b6078668bd36a08c9c606a Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Sat, 4 Jun 2016 21:29:44 +0800 Subject: Make set/unset commands in volume return normally when nothing specified set/unset commands should ends up normally instead of logging an error when nothing is specified to modify. The main reason is: When nothing is specified, the command sets/unsets nothing, which is a normal behavior, and ends up normally. No API call fails. No error happens. Change-Id: Ib03a512650e5da90aa1ef38019772448383d0d33 Partial-bug: #1588588 --- openstackclient/volume/v2/snapshot.py | 7 ------- 1 file changed, 7 deletions(-) (limited to 'openstackclient/volume/v2/snapshot.py') diff --git a/openstackclient/volume/v2/snapshot.py b/openstackclient/volume/v2/snapshot.py index 2886aaef..d9017080 100644 --- a/openstackclient/volume/v2/snapshot.py +++ b/openstackclient/volume/v2/snapshot.py @@ -205,11 +205,6 @@ class SetSnapshot(command.Command): if parsed_args.description: kwargs['description'] = parsed_args.description - if (not kwargs and not parsed_args.property and not - parsed_args.state): - self.app.log.error(_("No changes requested\n")) - return - if parsed_args.property: volume_client.volume_snapshots.set_metadata(snapshot.id, parsed_args.property) @@ -271,5 +266,3 @@ class UnsetSnapshot(command.Command): snapshot.id, parsed_args.property, ) - else: - self.app.log.error(_("No changes requested\n")) -- cgit v1.2.1