Ejemplo n.º 1
0
 def get_image_manifest(self):
     '''Assuming that there is a temp folder with a manifest.json of
     an image inside, get a dict of the manifest.json file'''
     temp_path = rootfs.get_working_dir()
     with general.pushd(temp_path):
         with open(manifest_file) as f:
             json_obj = json.loads(f.read())
     return json_obj
Ejemplo n.º 2
0
 def get_image_manifest(self):
     '''Assuming that there is a temp folder with a manifest.json of
     an image inside, get a dict of the manifest.json file'''
     temp_path = os.path.abspath(temp_folder)
     with pushd(temp_path):
         with open(manifest_file) as f:
             json_obj = json.loads(f.read())
     return json_obj
Ejemplo n.º 3
0
 def get_image_config(self, manifest):
     '''Assuming there now exists a working directory where the image
     metadata exists, return the image config'''
     config_file = self.get_image_config_file(manifest)
     # assuming that the config file path is in the same root path as the
     # manifest file
     temp_path = rootfs.get_working_dir()
     with general.pushd(temp_path):
         with open(config_file) as f:
             json_obj = json.loads(f.read())
     return json_obj