@click.command(name='show_snapshots')
@click.option('--repository', type=str, required=True, help='Snapshot repository name')
@click.option('--ignore_empty_list', is_flag=True, help='Do not raise exception if there are no actionable snapshots')
@click.option('--filter_list', callback=validate_filter_json, default='{"filtertype":"none"}', help='JSON string representing an array of filters.')
@click.pass_context
def show_snapshots_singleton(ctx, repository, ignore_empty_list, filter_list):
 action = 'delete_snapshots'
 c_args = ctx.obj['config']['client']
 client = get_client(**c_args)
 logger = logging.getLogger(__name__)
 logger.debug('Validating provided filters: {0}'.format(filter_list))
 clean_filters = {'filters': filter_schema_check(action, filter_list)}
 slo = SnapshotList(client, repository=repository)
 _do_filters(slo, clean_filters, ignore_empty_list)
 snapshots = sorted(slo.snapshots)
 for idx in snapshots:
  click.secho('{0}'.format(idx))

@ click . command ( name = 'show_snapshots' ) @ click . option ( '--repository' , type = str , required = True , help = 'Snapshot repository name' ) @ click . option ( '--ignore_empty_list' , is_flag = True , help = 'Do not raise exception if there are no actionable snapshots' ) @ click . option ( '--filter_list' , callback = validate_filter_json , default = '{"filtertype":"none"}' , help = 'JSON string representing an array of filters.' ) @ click . pass_context def show_snapshots_singleton ( ctx , repository , ignore_empty_list , filter_list ) : action = 'delete_snapshots' c_args = ctx . obj [ 'config' ] [ 'client' ] client = get_client ( ** c_args ) logger = logging . getLogger ( __name__ ) logger . debug ( 'Validating provided filters: {0}' . format ( filter_list ) ) clean_filters = { 'filters' : filter_schema_check ( action , filter_list ) } slo = SnapshotList ( client , repository = repository ) _do_filters ( slo , clean_filters , ignore_empty_list ) snapshots = sorted ( slo . snapshots ) for idx in snapshots : click . secho ( '{0}' . format ( idx ) )
show snapshots .