From f552302b614e612892714173b45b651caa10371a Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Fri, 18 Dec 2015 23:25:05 +0800 Subject: [PATCH] Trivial: Remove useless return from files in image and volume Change-Id: I3526ecd202d0908d91305a066ad72d03cee794b5 --- openstackclient/image/v1/image.py | 2 -- openstackclient/volume/v1/backup.py | 1 - openstackclient/volume/v1/qos_specs.py | 9 --------- openstackclient/volume/v1/snapshot.py | 3 --- openstackclient/volume/v1/volume.py | 4 ---- openstackclient/volume/v1/volume_type.py | 4 ---- openstackclient/volume/v2/backup.py | 1 - openstackclient/volume/v2/qos_specs.py | 9 --------- openstackclient/volume/v2/snapshot.py | 3 --- openstackclient/volume/v2/volume.py | 4 ---- openstackclient/volume/v2/volume_type.py | 4 ---- 11 files changed, 44 deletions(-) diff --git a/openstackclient/image/v1/image.py b/openstackclient/image/v1/image.py index 4ebc8f93e4..0382501ef6 100644 --- a/openstackclient/image/v1/image.py +++ b/openstackclient/image/v1/image.py @@ -679,8 +679,6 @@ class SetImage(command.Command): kwargs['data'] != sys.stdin): kwargs['data'].close() - return - class ShowImage(show.ShowOne): """Display image details""" diff --git a/openstackclient/volume/v1/backup.py b/openstackclient/volume/v1/backup.py index c668e36699..4f2ff8bb16 100644 --- a/openstackclient/volume/v1/backup.py +++ b/openstackclient/volume/v1/backup.py @@ -95,7 +95,6 @@ class DeleteBackup(command.Command): backup_id = utils.find_resource(volume_client.backups, backup).id volume_client.backups.delete(backup_id) - return class ListBackup(lister.Lister): diff --git a/openstackclient/volume/v1/qos_specs.py b/openstackclient/volume/v1/qos_specs.py index d1c70113cc..73e70a21fb 100644 --- a/openstackclient/volume/v1/qos_specs.py +++ b/openstackclient/volume/v1/qos_specs.py @@ -55,8 +55,6 @@ class AssociateQos(command.Command): volume_client.qos_specs.associate(qos_spec.id, volume_type.id) - return - class CreateQos(show.ShowOne): """Create new QoS specification""" @@ -123,7 +121,6 @@ class DeleteQos(command.Command): for qos in parsed_args.qos_specs: qos_spec = utils.find_resource(volume_client.qos_specs, qos) volume_client.qos_specs.delete(qos_spec.id) - return class DisassociateQos(command.Command): @@ -166,8 +163,6 @@ class DisassociateQos(command.Command): elif parsed_args.all: volume_client.qos_specs.disassociate_all(qos_spec.id) - return - class ListQos(lister.Lister): """List QoS specifications""" @@ -230,8 +225,6 @@ class SetQos(command.Command): else: self.app.log.error("No changes requested\n") - return - class ShowQos(show.ShowOne): """Display QoS specification details""" @@ -298,5 +291,3 @@ class UnsetQos(command.Command): parsed_args.property) else: self.app.log.error("No changes requested\n") - - return diff --git a/openstackclient/volume/v1/snapshot.py b/openstackclient/volume/v1/snapshot.py index 93e17eb8a6..24379a9a93 100644 --- a/openstackclient/volume/v1/snapshot.py +++ b/openstackclient/volume/v1/snapshot.py @@ -100,7 +100,6 @@ class DeleteSnapshot(command.Command): snapshot_id = utils.find_resource(volume_client.volume_snapshots, snapshot).id volume_client.volume_snapshots.delete(snapshot_id) - return class ListSnapshot(lister.Lister): @@ -226,7 +225,6 @@ class SetSnapshot(command.Command): return snapshot.update(**kwargs) - return class ShowSnapshot(show.ShowOne): @@ -291,4 +289,3 @@ class UnsetSnapshot(command.Command): ) else: self.app.log.error("No changes requested\n") - return diff --git a/openstackclient/volume/v1/volume.py b/openstackclient/volume/v1/volume.py index 0691d884a5..17b6c9c856 100644 --- a/openstackclient/volume/v1/volume.py +++ b/openstackclient/volume/v1/volume.py @@ -196,7 +196,6 @@ class DeleteVolume(command.Command): volume_client.volumes.force_delete(volume_obj.id) else: volume_client.volumes.delete(volume_obj.id) - return class ListVolume(lister.Lister): @@ -382,8 +381,6 @@ class SetVolume(command.Command): if not kwargs and not parsed_args.property and not parsed_args.size: self.app.log.error("No changes requested\n") - return - class ShowVolume(show.ShowOne): """Show volume details""" @@ -454,4 +451,3 @@ class UnsetVolume(command.Command): ) else: self.app.log.error("No changes requested\n") - return diff --git a/openstackclient/volume/v1/volume_type.py b/openstackclient/volume/v1/volume_type.py index d7765c7942..b664adfba6 100644 --- a/openstackclient/volume/v1/volume_type.py +++ b/openstackclient/volume/v1/volume_type.py @@ -81,7 +81,6 @@ class DeleteVolumeType(command.Command): volume_type_id = utils.find_resource( volume_client.volume_types, parsed_args.volume_type).id volume_client.volume_types.delete(volume_type_id) - return class ListVolumeType(lister.Lister): @@ -144,8 +143,6 @@ class SetVolumeType(command.Command): if parsed_args.property: volume_type.set_keys(parsed_args.property) - return - class UnsetVolumeType(command.Command): """Unset volume type properties""" @@ -182,7 +179,6 @@ class UnsetVolumeType(command.Command): volume_type.unset_keys(parsed_args.property) else: self.app.log.error("No changes requested\n") - return class ShowVolumeType(show.ShowOne): diff --git a/openstackclient/volume/v2/backup.py b/openstackclient/volume/v2/backup.py index 3525e701fe..bc919d0bc5 100644 --- a/openstackclient/volume/v2/backup.py +++ b/openstackclient/volume/v2/backup.py @@ -92,7 +92,6 @@ class DeleteBackup(command.Command): backup_id = utils.find_resource( volume_client.backups, backup).id volume_client.backups.delete(backup_id) - return class ListBackup(lister.Lister): diff --git a/openstackclient/volume/v2/qos_specs.py b/openstackclient/volume/v2/qos_specs.py index b3a34cac18..678fde4f3c 100644 --- a/openstackclient/volume/v2/qos_specs.py +++ b/openstackclient/volume/v2/qos_specs.py @@ -55,8 +55,6 @@ class AssociateQos(command.Command): volume_client.qos_specs.associate(qos_spec.id, volume_type.id) - return - class CreateQos(show.ShowOne): """Create new QoS specification""" @@ -123,7 +121,6 @@ class DeleteQos(command.Command): for qos in parsed_args.qos_specs: qos_spec = utils.find_resource(volume_client.qos_specs, qos) volume_client.qos_specs.delete(qos_spec.id) - return class DisassociateQos(command.Command): @@ -166,8 +163,6 @@ class DisassociateQos(command.Command): elif parsed_args.all: volume_client.qos_specs.disassociate_all(qos_spec.id) - return - class ListQos(lister.Lister): """List QoS specifications""" @@ -230,8 +225,6 @@ class SetQos(command.Command): else: self.app.log.error("No changes requested\n") - return - class ShowQos(show.ShowOne): """Display QoS specification details""" @@ -298,5 +291,3 @@ class UnsetQos(command.Command): parsed_args.property) else: self.app.log.error("No changes requested\n") - - return diff --git a/openstackclient/volume/v2/snapshot.py b/openstackclient/volume/v2/snapshot.py index aa7630ae6e..f939a553f3 100644 --- a/openstackclient/volume/v2/snapshot.py +++ b/openstackclient/volume/v2/snapshot.py @@ -97,7 +97,6 @@ class DeleteSnapshot(command.Command): snapshot_id = utils.find_resource( volume_client.volume_snapshots, snapshot).id volume_client.volume_snapshots.delete(snapshot_id) - return class ListSnapshot(lister.Lister): @@ -217,7 +216,6 @@ class SetSnapshot(command.Command): volume_client.volume_snapshots.set_metadata(snapshot.id, parsed_args.property) volume_client.volume_snapshots.update(snapshot.id, **kwargs) - return class ShowSnapshot(show.ShowOne): @@ -280,4 +278,3 @@ class UnsetSnapshot(command.Command): ) else: self.app.log.error("No changes requested\n") - return diff --git a/openstackclient/volume/v2/volume.py b/openstackclient/volume/v2/volume.py index bbcceca6bf..c636cf2fa1 100644 --- a/openstackclient/volume/v2/volume.py +++ b/openstackclient/volume/v2/volume.py @@ -189,7 +189,6 @@ class DeleteVolume(command.Command): volume_client.volumes.force_delete(volume_obj.id) else: volume_client.volumes.delete(volume_obj.id) - return class ListVolume(lister.Lister): @@ -394,8 +393,6 @@ class SetVolume(command.Command): if not kwargs and not parsed_args.property and not parsed_args.size: self.app.log.error("No changes requested\n") - return - class ShowVolume(show.ShowOne): """Display volume details""" @@ -452,4 +449,3 @@ class UnsetVolume(command.Command): volume_client.volumes.delete_metadata( volume.id, parsed_args.property) - return diff --git a/openstackclient/volume/v2/volume_type.py b/openstackclient/volume/v2/volume_type.py index 583e6ed9c6..06ab8f82c3 100644 --- a/openstackclient/volume/v2/volume_type.py +++ b/openstackclient/volume/v2/volume_type.py @@ -110,7 +110,6 @@ class DeleteVolumeType(command.Command): volume_type = utils.find_resource( volume_client.volume_types, parsed_args.volume_type) volume_client.volume_types.delete(volume_type.id) - return class ListVolumeType(lister.Lister): @@ -201,8 +200,6 @@ class SetVolumeType(command.Command): if parsed_args.property: volume_type.set_keys(parsed_args.property) - return - class ShowVolumeType(show.ShowOne): """Display volume type details""" @@ -258,4 +255,3 @@ class UnsetVolumeType(command.Command): parsed_args.volume_type, ) volume_type.unset_keys(parsed_args.property) - return