def add_image_args(self, zvm_image):
        if not zvm_image:
            return
        img_cache = {}
        for img in zvm_image:
            (imgpath, imgmp, imgacc) = (img.split(',') + [None] * 3)[:3]
            dev_name = img_cache.get(imgpath)
            if not dev_name:
                dev_name = self.create_manifest_channel(imgpath)
                img_cache[imgpath] = dev_name
            self.nvram_fstab.append((dev_name, imgmp or '/',  imgacc or 'ro'))
            nexe = None
            try:
                tar = tarfile.open(name=imgpath)
                nexe = tar.extractfile(self.program)
                tmpnexe_fn = os.path.join(self.tmpdir,
                                          'boot.%d' % self.node_id)
                tmpnexe_fd = open(tmpnexe_fn, 'wb')
                read_iter = iter(lambda: nexe.read(65535), b'')
                for chunk in read_iter:
                    tmpnexe_fd.write(chunk)
                tmpnexe_fd.close()
                self.program = tmpnexe_fn
            except (__HOLE__, tarfile.ReadError):
                pass
dataset/ETHPy150Open zerovm/zerovm-cli/zvshlib/zvsh.py/ZvShell.add_image_args