@@ -168,28 +168,6 @@ def _valid_bytes_range(bytes_range):
168
168
return True
169
169
170
170
171
- @app .route ('/v1/private_images/<image_id>/layer' , methods = ['GET' ])
172
- @toolkit .requires_auth
173
- @require_completion
174
- def get_private_image_layer (image_id ):
175
- try :
176
- headers = None
177
- bytes_range = None
178
- if store .supports_bytes_range :
179
- headers ['Accept-Ranges' ] = 'bytes'
180
- bytes_range = _parse_bytes_range ()
181
- repository = toolkit .get_repository ()
182
- if not repository :
183
- # No auth token found, either standalone registry or privileged
184
- # access. In both cases, private images are "disabled"
185
- return toolkit .api_error ('Image not found' , 404 )
186
- if not store .is_private (* repository ):
187
- return toolkit .api_error ('Image not found' , 404 )
188
- return _get_image_layer (image_id , headers , bytes_range )
189
- except exceptions .FileNotFoundError :
190
- return toolkit .api_error ('Image not found' , 404 )
191
-
192
-
193
171
@app .route ('/v1/images/<image_id>/layer' , methods = ['GET' ])
194
172
@toolkit .requires_auth
195
173
@require_completion
@@ -296,23 +274,6 @@ def put_image_checksum(image_id):
296
274
return toolkit .response ()
297
275
298
276
299
- @app .route ('/v1/private_images/<image_id>/json' , methods = ['GET' ])
300
- @toolkit .requires_auth
301
- @require_completion
302
- def get_private_image_json (image_id ):
303
- repository = toolkit .get_repository ()
304
- if not repository :
305
- # No auth token found, either standalone registry or privileged access
306
- # In both cases, private images are "disabled"
307
- return toolkit .api_error ('Image not found' , 404 )
308
- try :
309
- if not store .is_private (* repository ):
310
- return toolkit .api_error ('Image not found' , 404 )
311
- return _get_image_json (image_id )
312
- except exceptions .FileNotFoundError :
313
- return toolkit .api_error ('Image not found' , 404 )
314
-
315
-
316
277
@app .route ('/v1/images/<image_id>/json' , methods = ['GET' ])
317
278
@toolkit .requires_auth
318
279
@require_completion
@@ -422,26 +383,6 @@ def put_image_json(image_id):
422
383
return toolkit .response ()
423
384
424
385
425
- @app .route ('/v1/private_images/<image_id>/files' , methods = ['GET' ])
426
- @toolkit .requires_auth
427
- @require_completion
428
- def get_private_image_files (image_id , headers ):
429
- repository = toolkit .get_repository ()
430
- if not repository :
431
- # No auth token found, either standalone registry or privileged access
432
- # In both cases, private images are "disabled"
433
- return toolkit .api_error ('Image not found' , 404 )
434
- try :
435
- if not store .is_private (* repository ):
436
- return toolkit .api_error ('Image not found' , 404 )
437
- data = layers .get_image_files_json (image_id )
438
- return toolkit .response (data , headers = headers , raw = True )
439
- except exceptions .FileNotFoundError :
440
- return toolkit .api_error ('Image not found' , 404 )
441
- except tarfile .TarError :
442
- return toolkit .api_error ('Layer format not supported' , 400 )
443
-
444
-
445
386
@app .route ('/v1/images/<image_id>/files' , methods = ['GET' ])
446
387
@toolkit .requires_auth
447
388
@require_completion
0 commit comments