예제 #1
0
파일: _ostree.py 프로젝트: jwhonce/atomic
 def _make_image(self, image, info, remote=False):
     img_obj = Image(image, backend=self, remote=remote)
     if remote:
         return img_obj
     name = info['Id']
     img_obj.input_name = image
     img_obj.name = image
     img_obj.config = info
     img_obj.backend = self
     img_obj.id = name
     img_obj.registry = None
     img_obj.repo = None
     img_obj.image = image
     img_obj.tag = 'latest'
     img_obj.repotags = info['RepoTags']
     img_obj.created = info['Created']
     img_obj.size = None
     img_obj.original_structure = info
     img_obj.deep = True
     img_obj.labels = info['Labels']
     img_obj.version = img_obj.get_label("Version")
     img_obj.release = img_obj.get_label("Release")
     ostree_manifest = self.syscontainers.get_manifest(image)
     if ostree_manifest:
         ostree_manifest = json_loads(ostree_manifest)
     img_obj.digest = None if ostree_manifest is None else ostree_manifest.get('Digest') or ostree_manifest.get('digest')
     img_obj.os = img_obj.get_label("Os")
     img_obj.arch = img_obj.get_label("Arch")
     img_obj.graph_driver = None
     return img_obj
예제 #2
0
 def _make_image(self, image, info):
     name = info['Id']
     image = Image(image, backend=self, remote=False)
     image.name = name
     image.config = info
     image.backend = self
     image.id = name
     image.registry = None
     image.repo = None
     image.image = name
     image.tag = name
     image.repotags = info['RepoTags']
     image.created = info['Created']
     image.size = None
     image.original_structure = info
     image.input_name = info['Id']
     image.deep = True
     image.labels = info['Labels']
     image.version = image.get_label("Version")
     image.release = image.get_label("Release")
     image.digest = None
     image.os = image.get_label("Os")
     image.arch = image.get_label("Arch")
     image.graph_driver = None
     return image
예제 #3
0
파일: _ostree.py 프로젝트: baude/atomic
 def _make_image(self, image, info):
     name = info['Id']
     img_obj = Image(image, backend=self, remote=False)
     img_obj.input_name = image
     img_obj.name = image
     img_obj.config = info
     img_obj.backend = self
     img_obj.id = name
     img_obj.registry = None
     img_obj.repo = None
     img_obj.image = name
     img_obj.tag = name
     img_obj.repotags = info['RepoTags']
     img_obj.created = info['Created']
     img_obj.size = None
     img_obj.original_structure = info
     img_obj.deep = True
     img_obj.labels = info['Labels']
     img_obj.version = img_obj.get_label("Version")
     img_obj.release = img_obj.get_label("Release")
     img_obj.digest = None
     img_obj.os = img_obj.get_label("Os")
     img_obj.arch = img_obj.get_label("Arch")
     img_obj.graph_driver = None
     return img_obj
예제 #4
0
파일: _ostree.py 프로젝트: dharmit/atomic
 def _make_image(self, image, info, remote=False):
     img_obj = Image(image, backend=self, remote=remote)
     if remote:
         return img_obj
     name = info['Id']
     img_obj.input_name = image
     img_obj.name = image
     img_obj.config = info
     img_obj.backend = self
     img_obj.id = name
     img_obj.registry = None
     img_obj.repo = None
     img_obj.image = image
     img_obj.tag = 'latest'
     img_obj.repotags = info['RepoTags']
     img_obj.created = info['Created']
     img_obj.size = None
     img_obj.original_structure = info
     img_obj.deep = True
     img_obj.labels = info['Labels']
     img_obj.version = img_obj.get_label("Version")
     img_obj.release = img_obj.get_label("Release")
     ostree_manifest = self.syscontainers.get_manifest(image)
     if ostree_manifest:
         ostree_manifest = json_loads(ostree_manifest)
     img_obj.digest = None if ostree_manifest is None else ostree_manifest.get(
         'Digest') or ostree_manifest.get('digest')
     img_obj.os = img_obj.get_label("Os")
     img_obj.arch = img_obj.get_label("Arch")
     img_obj.graph_driver = None
     return img_obj