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:
parent
70c6fe1d63
commit
0a4daaf186
@ -14141,7 +14141,7 @@
|
|||||||
{
|
{
|
||||||
"id": "openstack",
|
"id": "openstack",
|
||||||
"title": "OpenStack",
|
"title": "OpenStack",
|
||||||
"modules": ["tc-approved-release", "governance", "api-wg"]
|
"modules": ["openstack-official", "governance", "api-wg"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "tc-approved-release",
|
"id": "tc-approved-release",
|
||||||
@ -14149,6 +14149,18 @@
|
|||||||
"child": true,
|
"child": true,
|
||||||
"modules": ["tc-approved-release"]
|
"modules": ["tc-approved-release"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "type:service",
|
||||||
|
"title": "type:service",
|
||||||
|
"child": true,
|
||||||
|
"modules": ["type:service"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "type:library",
|
||||||
|
"title": "type:library",
|
||||||
|
"child": true,
|
||||||
|
"modules": ["type:library"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "stackforge",
|
"id": "stackforge",
|
||||||
"title": "Stackforge",
|
"title": "Stackforge",
|
||||||
|
@ -218,7 +218,7 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"pattern": "^[\\w-]+$"
|
"pattern": "^[\\w:-]+$"
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
@ -230,7 +230,7 @@
|
|||||||
"type": ["array"],
|
"type": ["array"],
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"pattern": "^[\\w-]+$"
|
"pattern": "^[\\w:-]+$"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -187,7 +187,7 @@
|
|||||||
{
|
{
|
||||||
"id": "openstack",
|
"id": "openstack",
|
||||||
"title": "OpenStack",
|
"title": "OpenStack",
|
||||||
"modules": ["tc-approved-release", "governance", "python-openstackclient", "api-wg"]
|
"modules": ["openstack-official", "governance", "api-wg"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "tc-approved-release",
|
"id": "tc-approved-release",
|
||||||
@ -195,6 +195,18 @@
|
|||||||
"child": true,
|
"child": true,
|
||||||
"modules": ["tc-approved-release"]
|
"modules": ["tc-approved-release"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "type:service",
|
||||||
|
"title": "type:service",
|
||||||
|
"child": true,
|
||||||
|
"modules": ["type:service"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "type:library",
|
||||||
|
"title": "type:library",
|
||||||
|
"child": true,
|
||||||
|
"modules": ["type:library"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "stackforge",
|
"id": "stackforge",
|
||||||
"title": "Stackforge",
|
"title": "Stackforge",
|
||||||
|
@ -22,7 +22,15 @@ from stackalytics.processor import utils
|
|||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
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):
|
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))
|
content = yaml.safe_load(utils.read_uri(project_list_uri))
|
||||||
module_groups = collections.defaultdict(lambda: {'modules': []})
|
module_groups = collections.defaultdict(lambda: {'modules': []})
|
||||||
|
|
||||||
|
all_official = _make_module_group(module_groups, 'openstack-official')
|
||||||
|
|
||||||
for tag in TAGS:
|
for tag in TAGS:
|
||||||
m = module_groups[tag] # object created by defaultdict
|
_make_module_group(module_groups, tag)
|
||||||
m['tag'] = 'project_type'
|
|
||||||
m['module_group_name'] = tag
|
|
||||||
|
|
||||||
for name, project in six.iteritems(content):
|
for name, project in six.iteritems(content):
|
||||||
group_id = '%s-group' % name.lower()
|
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)
|
module_groups[group_id]['modules'].append(module_name)
|
||||||
|
|
||||||
|
all_official['modules'].append(module_name)
|
||||||
|
|
||||||
tags = deliverable.get('tags', [])
|
tags = deliverable.get('tags', [])
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
if tag in TAGS:
|
if tag in TAGS:
|
||||||
|
@ -79,7 +79,27 @@ class TestGovernance(testtools.TestCase):
|
|||||||
'module_group_name': 'tc-approved-release',
|
'module_group_name': 'tc-approved-release',
|
||||||
'modules': ['sahara', 'sahara-extra', 'sahara-image-elements'],
|
'modules': ['sahara', 'sahara-extra', 'sahara-image-elements'],
|
||||||
'tag': 'project_type'
|
'tag': 'project_type'
|
||||||
}
|
},
|
||||||
|
'type:library': {
|
||||||
|
'id': 'type:library',
|
||||||
|
'module_group_name': 'type:library',
|
||||||
|
'modules': ['python-saharaclient', 'sahara-dashboard'],
|
||||||
|
'tag': 'project_type'
|
||||||
|
},
|
||||||
|
'type:service': {
|
||||||
|
'id': 'type:service',
|
||||||
|
'module_group_name': 'type:service',
|
||||||
|
'modules': ['sahara', 'sahara-extra', 'sahara-image-elements'],
|
||||||
|
'tag': 'project_type'
|
||||||
|
},
|
||||||
|
'openstack-official': {
|
||||||
|
'id': 'openstack-official',
|
||||||
|
'module_group_name': 'openstack-official',
|
||||||
|
'modules': ['python-saharaclient', 'sahara',
|
||||||
|
'sahara-dashboard', 'sahara-extra',
|
||||||
|
'sahara-image-elements', 'sahara-specs'],
|
||||||
|
'tag': 'project_type'
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
actual = governance.read_projects_yaml('uri')
|
actual = governance.read_projects_yaml('uri')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user