@repo_mgr_cli.command('delete')
@click.option('--repository', required=True, help='Repository name', type=str)
@click.option('--yes', is_flag=True, callback=delete_callback, expose_value=False, prompt='Are you sure you want to delete the repository?')
@click.pass_context
def _delete(ctx, repository):
 client = get_client(**ctx.obj['client_args'])
 try:
  logger.info('Deleting repository {0}...'.format(repository))
  client.snapshot.delete_repository(repository=repository)
 except elasticsearch.NotFoundError:
  logger.error('Unable to delete repository: {0}  Not Found.'.format(repository))
  sys.exit(1)

@ repo_mgr_cli . command ( 'delete' ) @ click . option ( '--repository' , required = True , help = 'Repository name' , type = str ) @ click . option ( '--yes' , is_flag = True , callback = delete_callback , expose_value = False , prompt = 'Are you sure you want to delete the repository?' ) @ click . pass_context def _delete ( ctx , repository ) : client = get_client ( ** ctx . obj [ 'client_args' ] ) try : logger . info ( 'Deleting repository {0}...' . format ( repository ) ) client . snapshot . delete_repository ( repository = repository ) except elasticsearch . NotFoundError : logger . error ( 'Unable to delete repository: {0}  Not Found.' . format ( repository ) ) sys . exit ( 1 )
delete a resource type association or raise if not found .