diff --git a/endpoints/v2/manifest.py b/endpoints/v2/manifest.py index 1ba9be99f..64affc189 100644 --- a/endpoints/v2/manifest.py +++ b/endpoints/v2/manifest.py @@ -224,6 +224,10 @@ def fetch_manifest_by_tagname(namespace, repo_name, manifest_ref): manifest_ref) raise ManifestUnknown() + repo = model.repository.get_repository(namespace, repo_name) + if repo is not None: + track_and_log('pull_repo', repo) + return make_response(manifest.json_data, 200) @@ -238,6 +242,10 @@ def fetch_manifest_by_digest(namespace, repo_name, manifest_ref): # Without a tag name to reference, we can't make an attempt to generate the manifest raise ManifestUnknown() + repo = model.repository.get_repository(namespace, repo_name) + if repo is not None: + track_and_log('pull_repo', repo) + return make_response(manifest.json_data, 200) @@ -371,6 +379,8 @@ def delete_manifest_by_digest(namespace, repo_name, manifest_ref): manifest.delete_instance() + # TODO(jschorr): Log this as a new log type. + return make_response('', 202)