Merge pull request #3384 from quay/hide-export-logs

Hide all of the export log APIs when the feature is disabled
This commit is contained in:
Joseph Schorr 2019-02-26 15:57:13 -05:00 committed by GitHub
commit 694734a042
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -259,6 +259,7 @@ def _queue_logs_export(start_time, end_time, options, namespace_name, repository
@resource('/v1/repository/<apirepopath:repository>/exportlogs') @resource('/v1/repository/<apirepopath:repository>/exportlogs')
@show_if(features.LOG_EXPORT)
@path_param('repository', 'The full path of the repository. e.g. namespace/name') @path_param('repository', 'The full path of the repository. e.g. namespace/name')
class ExportRepositoryLogs(RepositoryParamResource): class ExportRepositoryLogs(RepositoryParamResource):
""" Resource for exporting the logs for the specific repository. """ """ Resource for exporting the logs for the specific repository. """
@ -287,6 +288,7 @@ class ExportRepositoryLogs(RepositoryParamResource):
@resource('/v1/user/exportlogs') @resource('/v1/user/exportlogs')
@show_if(features.LOG_EXPORT)
class ExportUserLogs(ApiResource): class ExportUserLogs(ApiResource):
""" Resource for exporting the logs for the current user repository. """ """ Resource for exporting the logs for the current user repository. """
schemas = { schemas = {