Deployment of OpenStack Specifications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.5 KiB

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import glob
import docutils.core
import testtools
'Problem Description': [],
'Proposed Change': [
'Security Impact',
'Other End User Impact',
'Performance Impact',
'Other Deployer Impact',
'Developer Impact',
'Implementation': [
'Work Items',
'Dependencies': [],
'Testing': [],
'Documentation Impact': [],
'References': [],
class TestTitles(testtools.TestCase):
def _get_title(self, section_tree):
section = {
'subtitles': [],
for node in section_tree:
if node.tagname == 'title':
section['name'] = node.rawsource
elif node.tagname == 'section':
# Note subsection subtitles are thrown away
subsection = self._get_title(node)
return section
def _get_titles(self, spec):
titles = {}
for node in spec:
if node.tagname == 'section':
section = self._get_title(node)
titles[section['name']] = section['subtitles']
return titles
def _check_titles(self, titles):
self.assertEqual(TITLES, titles)
def _run_template_tests(self, release_name):
files = ['specs/%s-template.rst' % release_name] + \
glob.glob('specs/%s/*' % release_name)
for filename in files:
"specs file must uses 'rst' extension.")
with open(filename) as f:
data =
spec = docutils.core.publish_doctree(data)
titles = self._get_titles(spec)
def test_juno_templates(self):
def test_kilo_templates(self):