Exemple #1
0
def process_project_list(runtime_storage_inst):
    module_groups = runtime_storage_inst.get_by_key('module_groups') or {}
    releases = runtime_storage_inst.get_by_key('releases') or {}

    official_module_groups = governance.process_official_list(releases)

    LOG.debug('Update module groups with official: %s', official_module_groups)
    module_groups.update(official_module_groups)

    # make list of OpenStack unofficial projects
    others = module_groups['openstack-others']
    off_rm = module_groups['openstack-official']['releases']
    official = dict((r, set(m)) for r, m in six.iteritems(off_rm))

    for module in module_groups['openstack']['modules']:
        for r, off_m in six.iteritems(official):
            if module not in off_m:
                others['releases'][r].add(module)

    # register modules as module groups
    repos = runtime_storage_inst.get_by_key('repos') or []
    for repo in repos:
        module = repo['module']
        module_groups[module] = utils.make_module_group(module, tag='module')

        if 'drivers' in repo:
            module_groups[module]['has_drivers'] = True

    # register module 'unknown' - used for emails not mapped to any module
    module_groups['unknown'] = utils.make_module_group('unknown', tag='module')

    runtime_storage_inst.set_by_key('module_groups', module_groups)
Exemple #2
0
def process_project_list(runtime_storage_inst):
    module_groups = runtime_storage_inst.get_by_key('module_groups') or {}
    releases = runtime_storage_inst.get_by_key('releases') or {}

    official_module_groups = governance.process_official_list(releases)

    LOG.debug('Update module groups with official: %s', official_module_groups)
    module_groups.update(official_module_groups)

    # make list of OpenStack unofficial projects
    others = module_groups.get('openstack-others')
    off_rm = module_groups.get('openstack-official', {}).get('releases')
    official = dict((r, set(m)) for r, m in six.iteritems(off_rm))

    for module in module_groups.get('openstack', {}).get('modules', []):
        for r, off_m in six.iteritems(official):
            if module not in off_m:
                others['releases'][r].add(module)

    # register modules as module groups
    repos = runtime_storage_inst.get_by_key('repos') or []
    for repo in repos:
        module = repo['module'].lower()
        module_groups[module] = utils.make_module_group(module, tag='module')

    # register module 'unknown' - used for emails not mapped to any module
    module_groups['unknown'] = utils.make_module_group('unknown', tag='module')

    runtime_storage_inst.set_by_key('module_groups', module_groups)
Exemple #3
0
    def test_process_official_list(self, read_uri):
        read_uri.return_value = SAMPLE

        expected = {
            'sahara-group': {
                'id': 'sahara-group',
                'module_group_name': 'Sahara Official',
                'modules': {'python-saharaclient', 'sahara',
                            'sahara-dashboard', 'sahara-extra',
                            'sahara-image-elements', 'sahara-specs'},
                'tag': 'program'
            },
            'tc-approved-release': {
                'id': 'tc-approved-release',
                'module_group_name': 'tc-approved-release',
                'modules': set(),
                'releases': {
                    'liberty': {'sahara', 'sahara-extra',
                                'sahara-image-elements'},
                },
                'tag': 'project_type'
            },
            'type:library': {
                'id': 'type:library',
                'module_group_name': 'type:library',
                'modules': set(),
                'releases': {
                    'liberty': {'python-saharaclient', 'sahara-dashboard'},
                },
                'tag': 'project_type'
            },
            'type:service': {
                'id': 'type:service',
                'module_group_name': 'type:service',
                'modules': set(),
                'releases': {
                    'liberty': {'sahara', 'sahara-extra',
                                'sahara-image-elements'},
                },
                'tag': 'project_type'
            },
            'openstack-official': {
                'id': 'openstack-official',
                'module_group_name': 'openstack-official',
                'modules': set(),
                'releases': {
                    'liberty': {'python-saharaclient', 'sahara',
                                'sahara-dashboard', 'sahara-extra',
                                'sahara-image-elements', 'sahara-specs'},
                },
                'tag': 'project_type'
            },
            'openstack-others': {
                'id': 'openstack-others',
                'module_group_name': 'openstack-others',
                'modules': set(),
                'releases': {},
                'tag': 'project_type'
            }
        }

        releases = [{
            'release_name': 'Liberty',
            'refs': {'governance': {'type': 'big_tent', 'source': 'uri'}}
        }]

        actual = governance.process_official_list(releases)

        self.assertEqual(expected, actual)