1 # -*- coding: utf-8 -*-
3 # ONAP documentation build configuration file, created by
4 # sphinx-quickstart on Wed Jul 19 16:25:31 2017.
6 # This file is execfile()d with the current directory set to its
9 # Note that not all possible configuration values are present in this
12 # All configuration values have a default; values that are commented out
13 # serve to show the default.
18 #import sphinx_bootstrap_theme
20 # If extensions (or modules to document with autodoc) are in another directory,
21 # add these directories to sys.path here. If the directory is relative to the
22 # documentation root, use os.path.abspath to make it absolute, like shown here.
23 #sys.path.insert(0, os.path.abspath('.'))
25 # -- General configuration ------------------------------------------------
27 # If your documentation needs a minimal Sphinx version, state it here.
28 needs_sphinx = '1.5.3'
30 # Add any Sphinx extension module names here, as strings. They can be
31 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
36 'sphinx.ext.graphviz',
39 'sphinx.ext.viewcode',
40 'sphinxcontrib.blockdiag',
41 'sphinxcontrib.needs',
42 'sphinxcontrib.nwdiag',
43 'sphinxcontrib.seqdiag',
44 'sphinx.ext.ifconfig',
46 'sphinxcontrib.plantuml',
47 'sphinxcontrib.swaggerdoc'
50 # Font path for seqdiag
51 seqdiag_fontpath = '/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed.ttf'
52 nwdiag_fontpath = '/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed.ttf'
54 # Add any paths that contain templates here, relative to this directory.
55 templates_path = ['_templates']
57 # The suffix(es) of source filenames.
58 # You can specify multiple suffix as a list of string:
59 # source_suffix = ['.rst', '.md']
60 source_suffix = '.rst'
62 # The encoding of source files.
63 #source_encoding = 'utf-8-sig'
65 # The master toctree document.
68 # General information about the project.
70 copyright = u'2017 ONAP. Licensed under Creative Commons Attribution 4.0 International License'
73 author = u'Open Network Automation Platform'
75 # The version info for the project you're documenting, acts as replacement for
76 # |version| and |release|, also used in various other places throughout the
78 # The short X.Y version.
80 # The full version, including alpha/beta/rc tags.
83 # The language for content autogenerated by Sphinx. Refer to documentation
84 # for a list of supported languages.
86 # This is also used if you do content translation via gettext catalogs.
87 # Usually you set "language" from the command line for these cases.
90 # There are two options for replacing |today|: either, you set today to some
91 # non-false value, then it is used:
93 # Else, today_fmt is used as the format for a strftime call.
94 #today_fmt = '%B %d, %Y'
96 # List of patterns, relative to source directory, that match files and
97 # directories to ignore when looking for source files.
102 # The reST default role (used for this markup: `text`) to use for all
106 # If true, '()' will be appended to :func: etc. cross-reference text.
107 #add_function_parentheses = True
109 # If true, the current module name will be prepended to all description
110 # unit titles (such as .. function::).
111 #add_module_names = True
113 # If true, sectionauthor and moduleauthor directives will be shown in the
114 # output. They are ignored by default.
115 #show_authors = False
117 # The name of the Pygments (syntax highlighting) style to use.
118 pygments_style = 'sphinx'
120 # A list of ignored prefixes for module index sorting.
121 #modindex_common_prefix = []
123 # If true, keep warnings as "system message" paragraphs in the built documents.
124 #keep_warnings = False
126 # If true, `todo` and `todoList` produce output, else they produce nothing.
127 todo_include_todos = True
130 # -- Options for HTML output ----------------------------------------------
132 # The theme to use for HTML and HTML Help pages. See the documentation for
133 # a list of builtin themes.
134 #html_theme = 'bootstrap'
135 #html_theme = 'classic'
136 html_theme = 'sphinx_rtd_theme'
138 # Theme options are theme-specific and customize the look and feel of a theme
139 # further. For a list of options available for each theme, see the
141 html_theme_options = {
142 'style_nav_header_background': 'white',
143 'sticky_navigation': False
146 # Add any paths that contain custom themes here, relative to this directory.
147 #html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
149 # The name for this set of Sphinx documents. If None, it defaults to
150 # "<project> v<release> documentation".
153 # A shorter title for the navigation bar. Default is the same as html_title.
154 #html_short_title = None
156 # The name of an image file (relative to this directory) to place at the top
158 html_logo = '_static/logo_onap_2017.png'
160 # The name of an image file (within the static path) to use as favicon of the
161 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
163 html_favicon = '_static/favicon.ico'
165 # Add any paths that contain custom static files (such as style sheets) here,
166 # relative to this directory. They are copied after the builtin static files,
167 # so a file named "default.css" will overwrite the builtin "default.css".
168 html_static_path = ['_static']
170 # Add any extra paths that contain custom files (such as robots.txt or
171 # .htaccess) here, relative to this directory. These files are copied
172 # directly to the root of the documentation.
173 #html_extra_path = []
175 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
176 # using the given strftime format.
177 html_last_updated_fmt = '%d-%b-%y %H:%M'
179 # If true, SmartyPants will be used to convert quotes and dashes to
180 # typographically correct entities.
181 #html_use_smartypants = True
183 # Custom sidebar templates, maps document names to template names.
186 # Additional templates that should be rendered to pages, maps page names to
188 #html_additional_pages = {}
190 # If false, no module index is generated.
191 #html_domain_indices = True
193 # If false, no index is generated.
194 #html_use_index = True
196 # If true, the index is split into individual pages for each letter.
197 #html_split_index = False
199 # If true, links to the reST sources are added to the pages.
200 #html_show_sourcelink = True
202 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
203 html_show_sphinx = False
205 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
206 #html_show_copyright = True
208 # If true, an OpenSearch description file will be output, and all pages will
209 # contain a <link> tag referring to it. The value of this option must be the
210 # base URL from which the finished HTML is served.
211 #html_use_opensearch = ''
213 # This is the file name suffix for HTML files (e.g. ".xhtml").
214 #html_file_suffix = None
216 # Language to be used for generating the HTML full-text search index.
217 # Sphinx supports the following languages:
218 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
219 # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
220 #html_search_language = 'en'
222 # A dictionary with options for the search language support, empty by default.
223 # Now only 'ja' uses this config value
224 #html_search_options = {'type': 'default'}
226 # The name of a javascript file (relative to the configuration directory) that
227 # implements a search results scorer. If empty, the default will be used.
228 #html_search_scorer = 'scorer.js'
230 # Output file base name for HTML help builder.
231 htmlhelp_basename = 'ONAPdoc'
233 # -- Options for LaTeX output ---------------------------------------------
236 # The paper size ('letterpaper' or 'a4paper').
237 #'papersize': 'letterpaper',
239 # The font size ('10pt', '11pt' or '12pt').
240 #'pointsize': '10pt',
242 # Additional stuff for the LaTeX preamble.
245 # Latex figure (float) alignment
246 #'figure_align': 'htbp',
249 # Grouping the document tree into LaTeX files. List of tuples
250 # (source start file, target name, title,
251 # author, documentclass [howto, manual, or own class]).
253 (master_doc, 'ONAP.tex', u'ONAP Documentation',
254 u'ONAP Contributors', 'manual'),
257 # The name of an image file (relative to this directory) to place at the top of
261 # For "manual" documents, if this is true, then toplevel headings are parts,
263 #latex_use_parts = False
265 # If true, show page references after internal links.
266 #latex_show_pagerefs = False
268 # If true, show URL addresses after external links.
269 #latex_show_urls = False
271 # Documents to append as an appendix to all manuals.
272 #latex_appendices = []
274 # If false, no module index is generated.
275 #latex_domain_indices = True
278 # -- Options for manual page output ---------------------------------------
280 # One entry per manual page. List of tuples
281 # (source start file, name, description, authors, manual section).
283 (master_doc, 'onap', u'ONAP Documentation',
287 # If true, show URL addresses after external links.
288 #man_show_urls = False
291 # -- Options for Texinfo output -------------------------------------------
293 # Grouping the document tree into Texinfo files. List of tuples
294 # (source start file, target name, title, author,
295 # dir menu entry, description, category)
296 texinfo_documents = [
297 (master_doc, 'ONAP', u'ONAP Documentation',
298 author, 'ONAP', 'Open Network Automation Platform',
302 # Documents to append as an appendix to all manuals.
303 #texinfo_appendices = []
305 # If false, no module index is generated.
306 #texinfo_domain_indices = True
308 # How to display URL addresses: 'footnote', 'no', or 'inline'.
309 #texinfo_show_urls = 'footnote'
311 # If true, do not generate a @detailmenu in the "Top" node's menu.
312 #texinfo_no_detailmenu = False
315 # -- Options for Epub output ----------------------------------------------
317 # Bibliographic Dublin Core info.
320 epub_publisher = author
321 epub_copyright = copyright
323 # The basename for the epub file. It defaults to the project name.
324 #epub_basename = project
326 # The HTML theme for the epub output. Since the default themes are not optimized
327 # for small screen space, using the same theme for HTML and epub output is
328 # usually not wise. This defaults to 'epub', a theme designed to save visual
332 # The language of the text. It defaults to the language option
333 # or 'en' if the language is not set.
336 # The scheme of the identifier. Typical schemes are ISBN or URL.
339 # The unique identifier of the text. This can be a ISBN number
340 # or the project homepage.
341 #epub_identifier = ''
343 # A unique identification for the text.
346 # A tuple containing the cover image and cover page html template filenames.
349 # A sequence of (type, uri, title) tuples for the guide element of content.opf.
352 # HTML files that should be inserted before the pages created by sphinx.
353 # The format is a list of tuples containing the path and title.
356 # HTML files shat should be inserted after the pages created by sphinx.
357 # The format is a list of tuples containing the path and title.
358 #epub_post_files = []
360 # A list of files that should not be packed into the epub file.
361 epub_exclude_files = ['search.html']
363 # The depth of the table of contents in toc.ncx.
366 # Allow duplicate toc entries.
369 # Choose between 'default' and 'includehidden'.
370 #epub_tocscope = 'default'
372 # Fix unsupported image types using the Pillow.
373 #epub_fix_images = False
375 # Scale large images.
376 #epub_max_image_width = 0
378 # How to display URL addresses: 'footnote', 'no', or 'inline'.
379 #epub_show_urls = 'inline'
381 # If false, no index is generated.
382 #epub_use_index = True
384 # Patterns to ignore in linkcheck builder
390 r'http://172\.[123]',
391 r'http://app_host:port/',
392 r'http://app-host:port/',
393 r'http://ESR_SERVICE_IP',
394 r'http://ESR_SERVER_IP',
395 r'http://hostIP:\d+/',
396 r'http://load-balanced-address:\d+/',
398 r'http://\$msb_address/',
399 r'http://\$MSB_SERVER_IP:\d+/',
400 r'http://msb_docker_host_ip:\d+/',
401 r'http://MSB_IP:MSB_PORT/',
402 r'http://msb.onap.org',
403 r'http://MSB_SERVER_IP:\d+/',
404 r'http://org.openecomp.',
405 r'http://{PDP_URL}:\d+/',
406 r'http://servername.domain.com',
407 r'http://.*simpledemo.openecomp.org',
408 r'http://.*simpledemo.onap.org',
409 r'http://.*test.att.com:\d+/',
410 r'http://we-are-data-router.us',
411 r'http://we-are-message-router.us:\d+/'
412 r'http://www.\[host\]:\[port\]/',
413 r'http://yourhostname',
418 r'https://172\.[123]',
419 r'https://aaf.onap.org',
420 r'https://\$CBAM_IP',
421 r'https://ESR_SERVICE_IP',
422 r'https://ESR_SERVER_IP',
423 r'https://msb.onap.org',
424 r'https://my-subscriber-app.dcae',
425 r'https://\$CBAM_IP:\d+/',
426 r'https://load-balanced-address:\d+/',
427 r'https://prov.datarouternew.com:8443',
428 r'https://.*simpledemo.openecomp.org',
429 r'https://.*simpledemo.onap.org',
430 r'https://.*test.att.com:\d+/',
431 r'https://we-are-data-router.us',
432 r'https://we-are-message-router.us:\d+/'
435 from docutils.parsers.rst import directives
437 needs_extra_options = {
438 "target": directives.unchanged,
439 "keyword": directives.unchanged,
440 "introduced": directives.unchanged,
441 "updated": directives.unchanged,
442 "impacts": directives.unchanged,
443 "validation_mode": directives.unchanged,
444 "validated_by": directives.unchanged,
445 "test": directives.unchanged,
446 "test_case": directives.unchanged,
447 "test_file": directives.unchanged,
448 "notes": directives.unchanged,
451 needs_id_regex = "^[A-Z0-9]+-[A-Z0-9]+"
452 needs_id_required = True
453 needs_title_optional = True
454 needs_file = "docs/data/needs.json"
455 needs_template_collapse = """
458 {% if hide == false -%}
460 .. role:: needs_status
463 .. role:: needs_title
466 .. rst-class:: need_{{type_name}}
470 `{{id}}` - {{content|indent(4)}}
472 .. container:: toggle
474 .. container:: header
478 {% if status and status|upper != "NONE" and not hide_status %} | status: :needs_status:`{{status}}`{% endif %}
479 {% if tags and not hide_tags %} | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %}
480 {% if keyword %} | keyword: `{{keyword}}` {% endif %}
481 {% if target %} | target: `{{target}}` {% endif %}
482 {% if introduced %} | introduced: `{{introduced}}` {% endif %}
483 {% if updated %} | updated: `{{updated}}` {% endif %}
484 {% if impacts %} | impacts: `{{impacts}}` {% endif %}
485 {% if validation_mode %} | validation mode: `{{validation_mode}}` {% endif %}
486 {% if validated_by %} | validated by: `{{validated_by}}` {% endif %}
487 {% if test %} | test: `{{test}}` {% endif %}
488 {% if test_case %} | test case: {{test_case}} {% endif %}
489 {% if test_file %} | test file: `{{test_file}}` {% endif %}
490 {% if notes %} | notes: `{{notes}}` {% endif %}
491 | children: :need_incoming:`{{id}}`
492 | parents: :need_outgoing:`{{id}}`
497 app.add_stylesheet("css/ribbon.css")