Exemple #1
0
 def dump_all(cls, blob_cls):
     result = []
     for repo in appr_app_model.list_applications(with_channels=True):
         package_name = repo.name
         for release in repo.releases:
             for mtype in cls.manifests(package_name, release):
                 package = appr_app_model.fetch_release(
                     package_name, release, mtype)
                 blob = blob_cls.get(package_name,
                                     package.manifest.content.digest)
                 app_data = cls._apptuple_to_dict(package)
                 app_data.pop('digest')
                 app_data['channels'] = [
                     x.name for x in appr_app_model.list_release_channels(
                         package_name, package.release, False)
                 ]
                 app_data['blob'] = blob.b64blob
                 result.append(app_data)
     return result
Exemple #2
0
 def _fetch(cls, package_name, release, media_type):
     data = model.fetch_release(package_name, release, manifest_media_type(media_type))
     return cls._apptuple_to_dict(data)