blob: aa98ecdbff30beafe008f7509e02ca49fbcfc136 [file] [log] [blame]
Rich Bennett22ef0852017-07-19 18:05:55 -04001# -*- coding: utf-8 -*-
2#
3# ONAP documentation build configuration file, created by
4# sphinx-quickstart on Wed Jul 19 16:25:31 2017.
5#
6# This file is execfile()d with the current directory set to its
7# containing dir.
8#
9# Note that not all possible configuration values are present in this
10# autogenerated file.
11#
12# All configuration values have a default; values that are commented out
13# serve to show the default.
14
15import sys
16import os
17import shlex
Rich Bennettae91ceb2017-10-16 08:28:03 -040018#import sphinx_bootstrap_theme
Rich Bennett22ef0852017-07-19 18:05:55 -040019
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('.'))
24
25# -- General configuration ------------------------------------------------
26
27# If your documentation needs a minimal Sphinx version, state it here.
Rich Bennettda7f8a12017-08-08 20:27:58 -040028needs_sphinx = '1.5.3'
Rich Bennett22ef0852017-07-19 18:05:55 -040029
30# Add any Sphinx extension module names here, as strings. They can be
31# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32# ones.
33extensions = [
34 'sphinx.ext.autodoc',
35 'sphinx.ext.doctest',
36 'sphinx.ext.graphviz',
37 'sphinx.ext.todo',
Rich Bennett9f0875c2017-08-07 21:38:02 -040038 'sphinx.ext.imgmath',
Rich Bennett22ef0852017-07-19 18:05:55 -040039 'sphinx.ext.viewcode',
Rich Bennett1da30462017-08-24 12:11:36 -040040 'sphinxcontrib.blockdiag',
Rich Bennett0ec5a752018-07-12 16:23:19 -040041 'sphinxcontrib.needs',
Rich Bennett3665e092018-05-08 00:06:15 -040042 'sphinxcontrib.nwdiag',
Rich Bennett3beeced2017-09-18 10:01:25 -040043 'sphinxcontrib.seqdiag',
44 'sphinx.ext.ifconfig',
45 'sphinx.ext.todo',
Rich Bennett3beeced2017-09-18 10:01:25 -040046 'sphinxcontrib.plantuml',
47 'sphinxcontrib.swaggerdoc'
Rich Bennett22ef0852017-07-19 18:05:55 -040048]
49
Rich Bennetta9d6a442017-08-25 02:37:15 -040050# Font path for seqdiag
Rich Bennett3665e092018-05-08 00:06:15 -040051seqdiag_fontpath = '/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed.ttf'
52nwdiag_fontpath = '/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed.ttf'
Rich Bennetta9d6a442017-08-25 02:37:15 -040053
Rich Bennett22ef0852017-07-19 18:05:55 -040054# Add any paths that contain templates here, relative to this directory.
55templates_path = ['_templates']
56
57# The suffix(es) of source filenames.
58# You can specify multiple suffix as a list of string:
59# source_suffix = ['.rst', '.md']
60source_suffix = '.rst'
61
62# The encoding of source files.
63#source_encoding = 'utf-8-sig'
64
65# The master toctree document.
66master_doc = 'index'
67
68# General information about the project.
Rich Bennettae91ceb2017-10-16 08:28:03 -040069project = u''
Manish Kumarc1895bc2019-02-14 22:38:23 +053070copyright = u'2019 ONAP. Licensed under Creative Commons Attribution 4.0 International License'
Rich Bennettc5995662017-10-18 15:27:52 -040071
72
Rich Bennettae91ceb2017-10-16 08:28:03 -040073author = u'Open Network Automation Platform'
Rich Bennett22ef0852017-07-19 18:05:55 -040074
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
77# built documents.
Rich Bennett22ef0852017-07-19 18:05:55 -040078# The short X.Y version.
Rich Bennett0463c5d2017-11-24 08:42:31 -050079version = 'master branch'
Rich Bennett22ef0852017-07-19 18:05:55 -040080# The full version, including alpha/beta/rc tags.
Rich Bennett0463c5d2017-11-24 08:42:31 -050081release = 'master branch'
Rich Bennett22ef0852017-07-19 18:05:55 -040082
83# The language for content autogenerated by Sphinx. Refer to documentation
84# for a list of supported languages.
85#
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.
88language = None
89
90# There are two options for replacing |today|: either, you set today to some
91# non-false value, then it is used:
92#today = ''
93# Else, today_fmt is used as the format for a strftime call.
94#today_fmt = '%B %d, %Y'
95
96# List of patterns, relative to source directory, that match files and
97# directories to ignore when looking for source files.
Rich Bennettd1f09492017-07-25 19:28:00 -040098exclude_patterns = [
Andrea Visnyei1a4fc332019-02-15 13:50:54 +010099 '_build'
Rich Bennettd1f09492017-07-25 19:28:00 -0400100 ]
Rich Bennett22ef0852017-07-19 18:05:55 -0400101
102# The reST default role (used for this markup: `text`) to use for all
103# documents.
104#default_role = None
105
106# If true, '()' will be appended to :func: etc. cross-reference text.
107#add_function_parentheses = True
108
109# If true, the current module name will be prepended to all description
110# unit titles (such as .. function::).
111#add_module_names = True
112
113# If true, sectionauthor and moduleauthor directives will be shown in the
114# output. They are ignored by default.
115#show_authors = False
116
117# The name of the Pygments (syntax highlighting) style to use.
118pygments_style = 'sphinx'
119
120# A list of ignored prefixes for module index sorting.
121#modindex_common_prefix = []
122
123# If true, keep warnings as "system message" paragraphs in the built documents.
124#keep_warnings = False
125
126# If true, `todo` and `todoList` produce output, else they produce nothing.
127todo_include_todos = True
128
129
130# -- Options for HTML output ----------------------------------------------
131
132# The theme to use for HTML and HTML Help pages. See the documentation for
133# a list of builtin themes.
Rich Bennett317d81a2018-09-11 07:38:05 -0400134#html_theme = 'classic'
135html_theme = 'sphinx_rtd_theme'
Rich Bennett22ef0852017-07-19 18:05:55 -0400136
137# Theme options are theme-specific and customize the look and feel of a theme
138# further. For a list of options available for each theme, see the
139# documentation.
Andrea Visnyei1a4fc332019-02-15 13:50:54 +0100140html_theme_options = { 'style_nav_header_background': 'white',
141 'sticky_navigation': False,
142 'collapse_navigation': False}
Rich Bennett22ef0852017-07-19 18:05:55 -0400143
144# Add any paths that contain custom themes here, relative to this directory.
Rich Bennettae91ceb2017-10-16 08:28:03 -0400145#html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
Rich Bennett22ef0852017-07-19 18:05:55 -0400146
147# The name for this set of Sphinx documents. If None, it defaults to
148# "<project> v<release> documentation".
149#html_title = None
150
151# A shorter title for the navigation bar. Default is the same as html_title.
152#html_short_title = None
153
154# The name of an image file (relative to this directory) to place at the top
155# of the sidebar.
156html_logo = '_static/logo_onap_2017.png'
157
158# The name of an image file (within the static path) to use as favicon of the
159# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
160# pixels large.
161html_favicon = '_static/favicon.ico'
162
163# Add any paths that contain custom static files (such as style sheets) here,
164# relative to this directory. They are copied after the builtin static files,
165# so a file named "default.css" will overwrite the builtin "default.css".
166html_static_path = ['_static']
167
168# Add any extra paths that contain custom files (such as robots.txt or
169# .htaccess) here, relative to this directory. These files are copied
170# directly to the root of the documentation.
171#html_extra_path = []
172
173# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
174# using the given strftime format.
Rich Bennett80455a52017-11-08 05:17:00 -0500175html_last_updated_fmt = '%d-%b-%y %H:%M'
Rich Bennett22ef0852017-07-19 18:05:55 -0400176
177# If true, SmartyPants will be used to convert quotes and dashes to
178# typographically correct entities.
179#html_use_smartypants = True
180
181# Custom sidebar templates, maps document names to template names.
182#html_sidebars = {}
183
184# Additional templates that should be rendered to pages, maps page names to
185# template names.
186#html_additional_pages = {}
187
188# If false, no module index is generated.
189#html_domain_indices = True
190
191# If false, no index is generated.
192#html_use_index = True
193
194# If true, the index is split into individual pages for each letter.
195#html_split_index = False
196
197# If true, links to the reST sources are added to the pages.
198#html_show_sourcelink = True
199
200# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
Rich Bennett80455a52017-11-08 05:17:00 -0500201html_show_sphinx = False
Rich Bennett22ef0852017-07-19 18:05:55 -0400202
203# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
204#html_show_copyright = True
205
206# If true, an OpenSearch description file will be output, and all pages will
207# contain a <link> tag referring to it. The value of this option must be the
208# base URL from which the finished HTML is served.
209#html_use_opensearch = ''
210
211# This is the file name suffix for HTML files (e.g. ".xhtml").
212#html_file_suffix = None
213
214# Language to be used for generating the HTML full-text search index.
215# Sphinx supports the following languages:
216# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
217# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
218#html_search_language = 'en'
219
220# A dictionary with options for the search language support, empty by default.
221# Now only 'ja' uses this config value
222#html_search_options = {'type': 'default'}
223
224# The name of a javascript file (relative to the configuration directory) that
225# implements a search results scorer. If empty, the default will be used.
226#html_search_scorer = 'scorer.js'
227
228# Output file base name for HTML help builder.
229htmlhelp_basename = 'ONAPdoc'
230
231# -- Options for LaTeX output ---------------------------------------------
232
233latex_elements = {
234# The paper size ('letterpaper' or 'a4paper').
235#'papersize': 'letterpaper',
236
237# The font size ('10pt', '11pt' or '12pt').
238#'pointsize': '10pt',
239
240# Additional stuff for the LaTeX preamble.
241#'preamble': '',
242
243# Latex figure (float) alignment
244#'figure_align': 'htbp',
245}
246
247# Grouping the document tree into LaTeX files. List of tuples
248# (source start file, target name, title,
249# author, documentclass [howto, manual, or own class]).
250latex_documents = [
251 (master_doc, 'ONAP.tex', u'ONAP Documentation',
252 u'ONAP Contributors', 'manual'),
253]
254
255# The name of an image file (relative to this directory) to place at the top of
256# the title page.
257#latex_logo = None
258
259# For "manual" documents, if this is true, then toplevel headings are parts,
260# not chapters.
261#latex_use_parts = False
262
263# If true, show page references after internal links.
264#latex_show_pagerefs = False
265
266# If true, show URL addresses after external links.
267#latex_show_urls = False
268
269# Documents to append as an appendix to all manuals.
270#latex_appendices = []
271
272# If false, no module index is generated.
273#latex_domain_indices = True
274
275
276# -- Options for manual page output ---------------------------------------
277
278# One entry per manual page. List of tuples
279# (source start file, name, description, authors, manual section).
280man_pages = [
281 (master_doc, 'onap', u'ONAP Documentation',
282 [author], 1)
283]
284
285# If true, show URL addresses after external links.
286#man_show_urls = False
287
288
289# -- Options for Texinfo output -------------------------------------------
290
291# Grouping the document tree into Texinfo files. List of tuples
292# (source start file, target name, title, author,
293# dir menu entry, description, category)
294texinfo_documents = [
295 (master_doc, 'ONAP', u'ONAP Documentation',
296 author, 'ONAP', 'Open Network Automation Platform',
297 'Platform'),
298]
299
300# Documents to append as an appendix to all manuals.
301#texinfo_appendices = []
302
303# If false, no module index is generated.
304#texinfo_domain_indices = True
305
306# How to display URL addresses: 'footnote', 'no', or 'inline'.
307#texinfo_show_urls = 'footnote'
308
309# If true, do not generate a @detailmenu in the "Top" node's menu.
310#texinfo_no_detailmenu = False
311
312
313# -- Options for Epub output ----------------------------------------------
314
315# Bibliographic Dublin Core info.
316epub_title = project
317epub_author = author
318epub_publisher = author
319epub_copyright = copyright
320
321# The basename for the epub file. It defaults to the project name.
322#epub_basename = project
323
324# The HTML theme for the epub output. Since the default themes are not optimized
325# for small screen space, using the same theme for HTML and epub output is
326# usually not wise. This defaults to 'epub', a theme designed to save visual
327# space.
328#epub_theme = 'epub'
329
330# The language of the text. It defaults to the language option
331# or 'en' if the language is not set.
332#epub_language = ''
333
334# The scheme of the identifier. Typical schemes are ISBN or URL.
335#epub_scheme = ''
336
337# The unique identifier of the text. This can be a ISBN number
338# or the project homepage.
339#epub_identifier = ''
340
341# A unique identification for the text.
342#epub_uid = ''
343
344# A tuple containing the cover image and cover page html template filenames.
345#epub_cover = ()
346
347# A sequence of (type, uri, title) tuples for the guide element of content.opf.
348#epub_guide = ()
349
350# HTML files that should be inserted before the pages created by sphinx.
351# The format is a list of tuples containing the path and title.
352#epub_pre_files = []
353
354# HTML files shat should be inserted after the pages created by sphinx.
355# The format is a list of tuples containing the path and title.
356#epub_post_files = []
357
358# A list of files that should not be packed into the epub file.
359epub_exclude_files = ['search.html']
360
361# The depth of the table of contents in toc.ncx.
362#epub_tocdepth = 3
363
364# Allow duplicate toc entries.
365#epub_tocdup = True
366
367# Choose between 'default' and 'includehidden'.
368#epub_tocscope = 'default'
369
370# Fix unsupported image types using the Pillow.
371#epub_fix_images = False
372
373# Scale large images.
374#epub_max_image_width = 0
375
376# How to display URL addresses: 'footnote', 'no', or 'inline'.
377#epub_show_urls = 'inline'
378
379# If false, no index is generated.
380#epub_use_index = True
Rich Bennett927141f2017-09-13 14:15:20 -0400381
382# Patterns to ignore in linkcheck builder
Rich Bennett3665e092018-05-08 00:06:15 -0400383linkcheck_ignore = [
Rich Bennett3665e092018-05-08 00:06:15 -0400384 r'http://$',
Rich Bennett054fce62018-05-22 00:07:55 -0400385 r'http:/$',
386 r'http://10\.',
387 r'http://127\.',
388 r'http://172\.[123]',
389 r'http://app_host:port/',
390 r'http://app-host:port/',
391 r'http://ESR_SERVICE_IP',
392 r'http://ESR_SERVER_IP',
393 r'http://hostIP:\d+/',
394 r'http://load-balanced-address:\d+/',
395 r'http://localhost',
396 r'http://\$msb_address/',
397 r'http://\$MSB_SERVER_IP:\d+/',
398 r'http://msb_docker_host_ip:\d+/',
399 r'http://MSB_IP:MSB_PORT/',
400 r'http://msb.onap.org',
401 r'http://MSB_SERVER_IP:\d+/',
402 r'http://org.openecomp.',
403 r'http://{PDP_URL}:\d+/',
404 r'http://servername.domain.com',
405 r'http://.*simpledemo.openecomp.org',
406 r'http://.*simpledemo.onap.org',
407 r'http://.*test.att.com:\d+/',
408 r'http://we-are-data-router.us',
409 r'http://we-are-message-router.us:\d+/'
410 r'http://www.\[host\]:\[port\]/',
411 r'http://yourhostname',
Rich Bennett3665e092018-05-08 00:06:15 -0400412 r'https://$',
Rich Bennett054fce62018-05-22 00:07:55 -0400413 r'https:/$',
414 r'https://10\.',
415 r'https://127\.',
416 r'https://172\.[123]',
417 r'https://aaf.onap.org',
418 r'https://\$CBAM_IP',
419 r'https://ESR_SERVICE_IP',
420 r'https://ESR_SERVER_IP',
421 r'https://msb.onap.org',
422 r'https://my-subscriber-app.dcae',
423 r'https://\$CBAM_IP:\d+/',
424 r'https://load-balanced-address:\d+/',
425 r'https://prov.datarouternew.com:8443',
426 r'https://.*simpledemo.openecomp.org',
427 r'https://.*simpledemo.onap.org',
428 r'https://.*test.att.com:\d+/',
429 r'https://we-are-data-router.us',
430 r'https://we-are-message-router.us:\d+/'
Rich Bennett3665e092018-05-08 00:06:15 -0400431 ]
Rich Bennett0ec5a752018-07-12 16:23:19 -0400432
433from docutils.parsers.rst import directives
434
435needs_extra_options = {
436 "target": directives.unchanged,
437 "keyword": directives.unchanged,
438 "introduced": directives.unchanged,
439 "updated": directives.unchanged,
440 "impacts": directives.unchanged,
441 "validation_mode": directives.unchanged,
442 "validated_by": directives.unchanged,
443 "test": directives.unchanged,
444 "test_case": directives.unchanged,
445 "test_file": directives.unchanged,
446 "notes": directives.unchanged,
447}
448
449needs_id_regex = "^[A-Z0-9]+-[A-Z0-9]+"
450needs_id_required = True
451needs_title_optional = True
452
453needs_template_collapse = """
454.. _{{id}}:
455
456{% if hide == false -%}
457.. role:: needs_tag
458.. role:: needs_status
459.. role:: needs_type
460.. role:: needs_id
461.. role:: needs_title
462
463.. rst-class:: need
464.. rst-class:: need_{{type_name}}
465
466.. container:: need
467
468 `{{id}}` - {{content|indent(4)}}
469
470 .. container:: toggle
471
472 .. container:: header
473
474 Details
475
476{% if status and status|upper != "NONE" and not hide_status %} | status: :needs_status:`{{status}}`{% endif %}
477{% if tags and not hide_tags %} | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %}
478{% if keyword %} | keyword: `{{keyword}}` {% endif %}
479{% if target %} | target: `{{target}}` {% endif %}
480{% if introduced %} | introduced: `{{introduced}}` {% endif %}
481{% if updated %} | updated: `{{updated}}` {% endif %}
482{% if impacts %} | impacts: `{{impacts}}` {% endif %}
483{% if validation_mode %} | validation mode: `{{validation_mode}}` {% endif %}
484{% if validated_by %} | validated by: `{{validated_by}}` {% endif %}
485{% if test %} | test: `{{test}}` {% endif %}
486{% if test_case %} | test case: {{test_case}} {% endif %}
487{% if test_file %} | test file: `{{test_file}}` {% endif %}
488{% if notes %} | notes: `{{notes}}` {% endif %}
489 | children: :need_incoming:`{{id}}`
490 | parents: :need_outgoing:`{{id}}`
491{% endif -%}
492"""
Rich Bennett317d81a2018-09-11 07:38:05 -0400493
494def setup(app):
495 app.add_stylesheet("css/ribbon.css")