コード例 #1
0
ファイル: test_api.py プロジェクト: xzwupeng/quay
 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
コード例 #2
0
ファイル: cnr_backend.py プロジェクト: zhill/quay
 def channels(self, channel_class, iscurrent=True):
     return [
         c.name
         for c in model.list_release_channels(self.package, self.release, active=iscurrent)
     ]