diff_branches: improve the generated title
Change-Id: I467ba9f1902d3ce25bf520cec87a7a60f070ff5e
This commit is contained in:
parent
38dc33b799
commit
9604ad685d
@ -28,6 +28,16 @@ from lxml import etree
|
|||||||
|
|
||||||
PROJECTS = ['ceilometer', 'cinder', 'glance', 'heat', 'keystone', 'neutron',
|
PROJECTS = ['ceilometer', 'cinder', 'glance', 'heat', 'keystone', 'neutron',
|
||||||
'nova', 'swift', 'trove']
|
'nova', 'swift', 'trove']
|
||||||
|
MASTER_RELEASE = 'Juno'
|
||||||
|
CODENAME_TITLE = {'ceilometer': 'Telemetry',
|
||||||
|
'cinder': 'OpenStack Block Storage',
|
||||||
|
'glance': 'OpenStack Image Service',
|
||||||
|
'heat': 'Orchestration',
|
||||||
|
'keystone': 'OpenStack Identity',
|
||||||
|
'neutron': 'OpenStack Networking',
|
||||||
|
'nova': 'OpenStack Compute',
|
||||||
|
'swift': 'OpenStack Object Storage',
|
||||||
|
'trove': 'Database Service'}
|
||||||
|
|
||||||
|
|
||||||
def setup_venv(branch, novenvupdate):
|
def setup_venv(branch, novenvupdate):
|
||||||
@ -192,6 +202,13 @@ def format_option_name(name):
|
|||||||
return "[%s] %s" % (section, name)
|
return "[%s] %s" % (section, name)
|
||||||
|
|
||||||
|
|
||||||
|
def release_from_branch(branch):
|
||||||
|
if branch == 'master':
|
||||||
|
return MASTER_RELEASE
|
||||||
|
else:
|
||||||
|
return branch.replace('stable/', '')
|
||||||
|
|
||||||
|
|
||||||
def generate_docbook(project, new_branch, old_list, new_list):
|
def generate_docbook(project, new_branch, old_list, new_list):
|
||||||
"""Generate the diff between the 2 options lists for `project`."""
|
"""Generate the diff between the 2 options lists for `project`."""
|
||||||
new_opts, changed_default, deprecated_opts = diff(old_list, new_list)
|
new_opts, changed_default, deprecated_opts = diff(old_list, new_list)
|
||||||
@ -209,7 +226,10 @@ def generate_docbook(project, new_branch, old_list, new_list):
|
|||||||
"lives in the openstack-doc-tools "
|
"lives in the openstack-doc-tools "
|
||||||
"repository. "))
|
"repository. "))
|
||||||
title = etree.Element("title")
|
title = etree.Element("title")
|
||||||
title.text = "New, updated and deprecated options for %s" % project
|
title.text = ("New, updated and deprecated options "
|
||||||
|
"in %(release)s for %(project)s" %
|
||||||
|
{'release': release_from_branch(new_branch),
|
||||||
|
'project': CODENAME_TITLE[project]})
|
||||||
section.append(title)
|
section.append(title)
|
||||||
|
|
||||||
# New options
|
# New options
|
||||||
@ -299,7 +319,7 @@ def main():
|
|||||||
|
|
||||||
release = args.new_branch.replace('stable/', '')
|
release = args.new_branch.replace('stable/', '')
|
||||||
xml = generate_docbook(project, release, old_list, new_list)
|
xml = generate_docbook(project, release, old_list, new_list)
|
||||||
filename = ("%(project)s-conf-changes-%(release)s.xml" %
|
filename = ("%(project)s-conf-changes.xml" %
|
||||||
{'project': project, 'release': release})
|
{'project': project, 'release': release})
|
||||||
if not os.path.exists(args.target):
|
if not os.path.exists(args.target):
|
||||||
os.makedirs(args.target)
|
os.makedirs(args.target)
|
||||||
|
Loading…
Reference in New Issue
Block a user