docker_image_list_.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:containerregistry 作者: google 项目源码 文件源码
def _content(
      self,
      suffix,
      accepted_mimes = None,
      cache = True
  ):
    """Fetches content of the resources from registry by http calls."""
    if isinstance(self._name, docker_name.Repository):
      suffix = '{repository}/{suffix}'.format(
          repository=self._name.repository,
          suffix=suffix)

    if suffix in self._response:
      return self._response[suffix]

    _, content = self._transport.Request(
        '{scheme}://{registry}/v2/{suffix}'.format(
            scheme=docker_http.Scheme(self._name.registry),
            registry=self._name.registry,
            suffix=suffix),
        accepted_codes=[httplib.OK],
        accepted_mimes=accepted_mimes)
    if cache:
      self._response[suffix] = content
    return content
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号