# -*- coding: utf-8 -*-
#
+# 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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+#
# Heat documentation build configuration file, created by
# sphinx-quickstart on Thu Dec 13 11:23:35 2012.
#
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc',
- 'sphinx.ext.ifconfig',
- 'sphinx.ext.viewcode',
- 'heat.doc.resources']
+ 'sphinx.ext.ifconfig',
+ 'sphinx.ext.viewcode',
+ 'heat.doc.resources']
# Add any paths that contain templates here, relative to this directory.
#templates_path = ['_templates']
# -- Options for LaTeX output -------------------------------------------------
latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
+ # The paper size ('letterpaper' or 'a4paper').
+ #'papersize': 'letterpaper',
-# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
+ # The font size ('10pt', '11pt' or '12pt').
+ #'pointsize': '10pt',
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
+ # Additional stuff for the LaTeX preamble.
+ #'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual])
latex_documents = [
- ('index', 'Heat.tex', u'Heat Documentation',
- u'Heat Developers', 'manual'),
+ ('index', 'Heat.tex', u'Heat Documentation',
+ u'Heat Developers', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# (source start file, name, description, authors, manual section).
man_pages = [
('man/heat-api', 'heat-api',
- u'REST API service to the heat project.',
- [u'Heat Developers'], 1),
+ u'REST API service to the heat project.',
+ [u'Heat Developers'], 1),
('man/heat-api-cfn', 'heat-api-cfn',
- u'CloudFormation compatible API service to the heat project.',
- [u'Heat Developers'], 1),
+ u'CloudFormation compatible API service to the heat project.',
+ [u'Heat Developers'], 1),
('man/heat-api-cloudwatch', 'heat-api-cloudwatch',
- u'CloudWatch alike API service to the heat project',
- [u'Heat Developers'], 1),
+ u'CloudWatch alike API service to the heat project',
+ [u'Heat Developers'], 1),
('man/heat-db-setup', 'heat-db-setup',
- u'Command line utility to setup the Heat database',
- [u'Heat Developers'], 1),
+ u'Command line utility to setup the Heat database',
+ [u'Heat Developers'], 1),
('man/heat-engine', 'heat-engine',
- u'Service which performs the actions from the API calls made by the user',
- [u'Heat Developers'], 1),
+ u'Service which performs the actions from the API calls made by the user',
+ [u'Heat Developers'], 1),
('man/heat-keystone-setup', 'heat-keystone-setup',
- u'Script which sets up keystone for usage by Heat',
- [u'Heat Developers'], 1),
+ u'Script which sets up keystone for usage by Heat',
+ [u'Heat Developers'], 1),
]
# If true, show URL addresses after external links.
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- ('index', 'Heat', u'Heat Documentation',
- u'Heat Developers', 'Heat', 'One line description of project.',
- 'Miscellaneous'),
+ ('index', 'Heat', u'Heat Documentation',
+ u'Heat Developers', 'Heat', 'One line description of project.',
+ 'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
from sphinx.util.compat import Directive
-class resourcepages(nodes.General, nodes.Element): pass
+class resourcepages(nodes.General, nodes.Element):
+ pass
class ResourcePages(Directive):
final_argument_whitespace = False
option_spec = {}
-
def run(self):
prefix = self.arguments and self.arguments.pop() or None
content = []
def _prop_syntax_example(self, prop):
if not prop or not prop.get('Type'):
return 'Value'
- prop_type=prop.get('Type')
+ prop_type = prop.get('Type')
if prop_type == 'List':
sub_prop = prop.get('Schema')
sub_type = self._prop_syntax_example(sub_prop)
for prop_key in sorted(schema.keys()):
prop = schema[prop_key]
if prop.get('Implemented', True):
- props.append('%s: %s' % (prop_key, self._prop_syntax_example(prop)))
+ props.append('%s: %s' % (prop_key,
+ self._prop_syntax_example(prop)))
template = '''heat_template_version: 2013-05-23
...
for prop_key in sorted(schema.keys()):
prop = schema[prop_key]
if prop.get('Implemented', True):
- props.append('%s: %s' % (prop_key, self._prop_syntax_example(prop)))
+ props.append('%s: %s' % (prop_key,
+ self._prop_syntax_example(prop)))
template = '''HeatTemplateFormatVersion: '2012-12-12'
...
for prop_key in sorted(schema.keys()):
prop = schema[prop_key]
if prop.get('Implemented', True):
- props.append('"%s": %s' % (prop_key, self._prop_syntax_example(prop)))
+ props.append('"%s": %s' % (prop_key,
+ self._prop_syntax_example(prop)))
template = '''{
"AWSTemplateFormatVersion" : "2010-09-09",
...
block = nodes.literal_block('', template)
section.append(block)
-
def contribute_property(self, prop_list, prop_key, prop):
prop_item = nodes.definition_list_item(
- '',nodes.term('', prop_key))
+ '', nodes.term('', prop_key))
prop_list.append(prop_item)
prop_type = prop.get('Type')
elif prop.get('Default'):
para = nodes.paragraph(
'',
- _('Optional property, defaults to "%s".') % prop.get('Default'))
+ _('Optional property, defaults to "%s".') %
+ prop.get('Default'))
else:
para = nodes.paragraph('', _('Optional property.'))
definition.append(para)
definition.append(para)
if prop.get('AllowedValues'):
- allowed = [str(a) for a in prop.get('AllowedValues') if a is not None]
+ allowed = [str(a) for a in prop.get('AllowedValues')
+ if a is not None]
para = nodes.paragraph('', _(
'Allowed values: %s') % ', '.join(allowed))
definition.append(para)
prop = schema[prop_key]
self.contribute_property(prop_list, prop_key, prop)
-
def contribute_attributes(self, parent):
schema = self.resource_class.attributes_schema
if not schema:
for prop_key in sorted(schema.keys()):
description = schema[prop_key]
prop_item = nodes.definition_list_item(
- '',nodes.term('', prop_key))
+ '', nodes.term('', prop_key))
prop_list.append(prop_item)
definition = nodes.definition()