def versions():
     dists = {}
     for dist in introspection.get_distributions().itervalues():
         dists[dist.key] = DistributionInfo(project_name=dist.project_name,
                                            version=dist.version,
                                            relengapi_metadata={})
     blueprints = {}
     relengapi_dist = pkg_resources.get_distribution('relengapi')
     for bp in app.relengapi_blueprints.itervalues():
         blueprints[bp.name] = BlueprintInfo(distribution='relengapi',
                                             version=relengapi_dist.version)
     return VersionInfo(distributions=dists, blueprints=blueprints)
예제 #2
0
 def versions():
     dists = {}
     for dist in introspection.get_distributions().itervalues():
         relengapi_metadata = dist.relengapi_metadata
         dists[dist.key] = DistributionInfo(
             project_name=dist.project_name,
             version=dist.version,
             relengapi_metadata=relengapi_metadata)
     blueprints = {}
     for bp in app.relengapi_blueprints.itervalues():
         blueprints[bp.name] = BlueprintInfo(distribution=bp.dist.key,
                                             version=bp.dist.version)
     return VersionInfo(distributions=dists, blueprints=blueprints)
예제 #3
0
 def versions():
     dists = {}
     for dist in introspection.get_distributions().itervalues():
         relengapi_metadata = dist.relengapi_metadata
         dists[dist.key] = DistributionInfo(
             project_name=dist.project_name,
             version=dist.version,
             relengapi_metadata=relengapi_metadata)
     blueprints = {}
     for bp in app.relengapi_blueprints.itervalues():
         blueprints[bp.name] = BlueprintInfo(distribution=bp.dist.key,
                                             version=bp.dist.version)
     return VersionInfo(distributions=dists, blueprints=blueprints)
예제 #4
0
 def versions():
     dists = {}
     for dist in introspection.get_distributions().itervalues():
         dists[dist.key] = DistributionInfo(
             project_name=dist.project_name,
             version=dist.version,
             relengapi_metadata={})
     blueprints = {}
     relengapi_dist = pkg_resources.get_distribution('relengapi')
     for bp in app.relengapi_blueprints.itervalues():
         blueprints[bp.name] = BlueprintInfo(distribution='relengapi',
                                             version=relengapi_dist.version)
     return VersionInfo(distributions=dists, blueprints=blueprints)
예제 #5
0
 def versions():
     dists = {}
     log = logger.bind(frobnication_id='12345', permissions=['frob', 'blob'])
     log.warning("frobnication failed")
     for dist in introspection.get_distributions().itervalues():
         dists[dist.key] = DistributionInfo(
             project_name=dist.project_name,
             version=dist.version,
             relengapi_metadata={})
     blueprints = {}
     relengapi_dist = pkg_resources.get_distribution('relengapi')
     for bp in app.relengapi_blueprints.itervalues():
         blueprints[bp.name] = BlueprintInfo(distribution='relengapi',
                                             version=relengapi_dist.version)
     return VersionInfo(distributions=dists, blueprints=blueprints)
예제 #6
0
def test_get_distributions():
    distributions = introspection.get_distributions()
    eq_(distributions['relengapi'].project_name, 'relengapi')
예제 #7
0
def test_metadata():
    distributions = introspection.get_distributions()
    meta = distributions['relengapi'].relengapi_metadata
    assert 'repository_of_record' in meta