Add official openstack module group
Also add project types for 2 types of deliverables: service and library Change-Id: I3e85102ac895e49a84f07f083883fd1c96cdd8f3
This commit is contained in:
@@ -22,7 +22,15 @@ from stackalytics.processor import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
TAGS = ['tc-approved-release'] # list of supported tags
|
||||
# list of supported tags
|
||||
TAGS = ['tc-approved-release', 'type:service', 'type:library']
|
||||
|
||||
|
||||
def _make_module_group(module_groups, name):
|
||||
m = module_groups[name] # object created by defaultdict
|
||||
m['tag'] = 'project_type'
|
||||
m['module_group_name'] = name
|
||||
return m
|
||||
|
||||
|
||||
def read_projects_yaml(project_list_uri):
|
||||
@@ -30,10 +38,10 @@ def read_projects_yaml(project_list_uri):
|
||||
content = yaml.safe_load(utils.read_uri(project_list_uri))
|
||||
module_groups = collections.defaultdict(lambda: {'modules': []})
|
||||
|
||||
all_official = _make_module_group(module_groups, 'openstack-official')
|
||||
|
||||
for tag in TAGS:
|
||||
m = module_groups[tag] # object created by defaultdict
|
||||
m['tag'] = 'project_type'
|
||||
m['module_group_name'] = tag
|
||||
_make_module_group(module_groups, tag)
|
||||
|
||||
for name, project in six.iteritems(content):
|
||||
group_id = '%s-group' % name.lower()
|
||||
@@ -49,6 +57,8 @@ def read_projects_yaml(project_list_uri):
|
||||
|
||||
module_groups[group_id]['modules'].append(module_name)
|
||||
|
||||
all_official['modules'].append(module_name)
|
||||
|
||||
tags = deliverable.get('tags', [])
|
||||
for tag in tags:
|
||||
if tag in TAGS:
|
||||
|
Reference in New Issue
Block a user