]> git.proxmox.com Git - mirror_ovs.git/blob - Documentation/conf.py
Documentation: Fix rendering of extra repo info for RHEL 8.
[mirror_ovs.git] / Documentation / conf.py
1 # -*- coding: utf-8 -*-
2 #
3 # Open vSwitch documentation build configuration file, created by
4 # sphinx-quickstart on Fri Sep 30 09:57:36 2016.
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
15 import string
16 import sys
17
18 try:
19 import ovs_sphinx_theme
20 use_ovs_theme = True
21 except ImportError:
22 print("Cannot find 'ovs-sphinx-theme' package. "
23 "Falling back to default theme.")
24 use_ovs_theme = False
25
26 # -- General configuration ------------------------------------------------
27
28 # If your documentation needs a minimal Sphinx version, state it here.
29 #
30 needs_sphinx = '1.1'
31
32 # Add any Sphinx extension module names here, as strings. They can be
33 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
34 # ones.
35 extensions = ['sphinx.ext.todo']
36
37 # Add any paths that contain templates here, relative to this directory.
38 templates_path = ['_templates']
39
40 # The suffix(es) of source filenames.
41 # You can specify multiple suffix as a list of string:
42 #
43 # source_suffix = ['.rst', '.md']
44 source_suffix = '.rst'
45
46 # The master toctree document.
47 master_doc = 'contents'
48
49 # General information about the project.
50 project = u'Open vSwitch'
51 copyright = u'2016, The Open vSwitch Development Community'
52 author = u'The Open vSwitch Development Community'
53
54 # The version info for the project you're documenting, acts as replacement for
55 # |version| and |release|, also used in various other places throughout the
56 # built documents.
57 #
58 # The full version, including alpha/beta/rc tags.
59 release = None
60 filename = "../configure.ac"
61 with open(filename, 'r') as f:
62 for line in f:
63 if 'AC_INIT' in line:
64 # Parse "AC_INIT(openvswitch, 2.7.90, bugs@openvswitch.org)":
65 release = line.split(',')[1].strip(string.whitespace + '[]')
66 break
67 if release is None:
68 sys.stderr.write('%s: failed to determine Open vSwitch version\n'
69 % filename)
70 sys.exit(1)
71
72 # The short X.Y version.
73 #
74 # However, it's important to know the difference between, e.g., 2.7
75 # and 2.7.90, which can be very different versions (2.7.90 may be much
76 # closer to 2.8 than to 2.7), so check for that.
77 version = release if '.90' in release else '.'.join(release.split('.')[0:2])
78
79 # List of patterns, relative to source directory, that match files and
80 # directories to ignore when looking for source files.
81 # This patterns also effect to html_static_path and html_extra_path
82 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
83
84 # If true, check the validity of #anchors in links.
85 linkcheck_anchors = False
86
87 # -- Options for HTML output ----------------------------------------------
88
89 # The theme to use for HTML and HTML Help pages. See the documentation for
90 # a list of builtin themes.
91 #
92 if use_ovs_theme:
93 html_theme = 'ovs'
94
95 # Add any paths that contain custom themes here, relative to this directory.
96 if use_ovs_theme:
97 html_theme_path = [ovs_sphinx_theme.get_theme_dir()]
98 else:
99 html_theme_path = []
100
101 # The name of an image file (relative to this directory) to place at the top
102 # of the sidebar.
103 #
104 html_logo = '_static/logo.png'
105
106 # Add any paths that contain custom static files (such as style sheets) here,
107 # relative to this directory. They are copied after the builtin static files,
108 # so a file named "default.css" will overwrite the builtin "default.css".
109 html_static_path = ['_static']
110
111
112 # -- Options for manual page output ---------------------------------------
113
114 # One entry per manual page. List of tuples
115 # (source start file, name, description, authors, manual section).
116 _man_pages = [
117 ('ovs-appctl.8',
118 u'utility for configuring running Open vSwitch daemons'),
119 ('ovs-ctl.8',
120 u'OVS startup helper script'),
121 ('ovs-l3ping.8',
122 u'check network deployment for L3 tunneling problems'),
123 ('ovs-parse-backtrace.8',
124 u'parses ovs-appctl backtrace output'),
125 ('ovs-pki.8',
126 u'OpenFlow public key infrastructure management utility'),
127 ('ovs-sim.1',
128 u'Open vSwitch simulator environment'),
129 ('ovs-tcpdump.8',
130 u'Dump traffic from an Open vSwitch port using tcpdump'),
131 ('ovs-tcpundump.1',
132 u'convert "tcpdump -xx" output to hex strings'),
133 ('ovs-test.8',
134 u'Check Linux drivers for performance, vlan and L3 tunneling problems'),
135 ('ovs-vlan-test.8',
136 u'Check Linux drivers for problems with vlan traffic'),
137 ('ovsdb-server.7',
138 u'Open vSwitch Database Server Protocol'),
139 ('ovsdb.5',
140 u'Open vSwitch Database (File Formats)'),
141 ('ovsdb.7',
142 u'Open vSwitch Database (Overview)'),
143 ]
144
145 # Generate list of (path, name, description, [author, ...], section)
146 man_pages = [
147 ('ref/%s' % file_name, file_name.split('.', 1)[0],
148 description, [author], file_name.split('.', 1)[1])
149 for file_name, description in _man_pages]