We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8f07476 + 8acead3 commit dabaec5Copy full SHA for dabaec5
1 file changed
openstackclient/volume/v2/volume_backup.py
@@ -310,9 +310,17 @@ def take_action(self, parsed_args):
310
311
filter_volume_id = None
312
if parsed_args.volume:
313
- filter_volume_id = utils.find_resource(
314
- volume_client.volumes, parsed_args.volume,
315
- ).id
+ try:
+ filter_volume_id = utils.find_resource(
+ volume_client.volumes, parsed_args.volume,
316
+ ).id
317
+ except exceptions.CommandError:
318
+ # Volume with that ID does not exist, but search for backups
319
+ # for that volume nevertheless
320
+ LOG.debug("No volume with ID %s existing, continuing to "
321
+ "search for backups for that volume ID",
322
+ parsed_args.volume)
323
+ filter_volume_id = parsed_args.volume
324
325
marker_backup_id = None
326
if parsed_args.marker:
0 commit comments