def _patch_upload(
self,
image,
digest
):
mounted, location = self._start_upload(digest, self._mount)
if mounted:
logging.info('Layer %s mounted.', digest)
return
location = self._get_absolute_url(location)
resp, unused_content = self._transport.Request(
location, method='PATCH', body=image.blob(digest),
content_type='application/octet-stream',
accepted_codes=[httplib.NO_CONTENT, httplib.ACCEPTED, httplib.CREATED])
location = self._add_digest(resp['location'], digest)
location = self._get_absolute_url(location)
self._transport.Request(
location, method='PUT', body=None,
accepted_codes=[httplib.CREATED])
评论列表
文章目录