blob: 2de736ec9a665f8942dc874cb07ab69b5c550f90 [file] [log] [blame]
Guillaume Lambert3931bb12021-02-17 11:48:28 +01001from docutils.parsers.rst import directives
Aric Gardner0fb94b12020-01-28 15:21:34 -05002from docs_conf.conf import *
Rich Bennett22ef0852017-07-19 18:05:55 -04003
Eric Debeaudfd985f2020-11-26 16:01:59 +01004branch = 'latest'
Aric Gardnera78f0db2020-06-26 13:09:32 -04005doc_url = 'https://docs.onap.org/projects'
Rich Bennett22ef0852017-07-19 18:05:55 -04006master_doc = 'index'
7
Aric Gardner0fb94b12020-01-28 15:21:34 -05008linkcheck_ignore = [
9 'http://localhost',
10]
Rich Bennettc5995662017-10-18 15:27:52 -040011
Aric Gardner0fb94b12020-01-28 15:21:34 -050012intersphinx_mapping = {}
Rich Bennettc5995662017-10-18 15:27:52 -040013
Guillaume Lambert3931bb12021-02-17 11:48:28 +010014intersphinx_mapping['onap-oom-offline-installer'] = (
15 '{}/onap-oom-offline-installer/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040016intersphinx_mapping['onap-oom'] = ('{}/onap-oom/en/%s'.format(doc_url) % branch, None)
Aric Gardnerb9606a32020-04-06 14:48:39 -040017intersphinx_mapping['onap-osa'] = ('{}/onap-osa/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040018intersphinx_mapping['onap-oparent-cia'] = ('{}/onap-oparent-cia/en/%s'.format(doc_url) % branch, None)
Guillaume Lambert3931bb12021-02-17 11:48:28 +010019intersphinx_mapping['onap-music-distributed-kv-store'] = (
20 '{}/onap-music-distributed-kv-store/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040021intersphinx_mapping['onap-dmaap-dbcapi'] = ('{}/onap-dmaap-dbcapi/en/%s'.format(doc_url) % branch, None)
22intersphinx_mapping['onap-msb-swagger-sdk'] = ('{}/onap-msb-swagger-sdk/en/%s'.format(doc_url) % branch, None)
23intersphinx_mapping['onap-msb-java-sdk'] = ('{}/onap-msb-java-sdk/en/%s'.format(doc_url) % branch, None)
Guillaume Lambert3931bb12021-02-17 11:48:28 +010024intersphinx_mapping['onap-holmes-engine-management'] = (
25 '{}/onap-holmes-engine-management/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040026intersphinx_mapping['onap-multicloud-azure'] = ('{}/onap-multicloud-azure/en/%s'.format(doc_url) % branch, None)
27intersphinx_mapping['onap-modeling-etsicatalog'] = ('{}/onap-modeling-etsicatalog/en/%s'.format(doc_url) % branch, None)
Guillaume Lambert3931bb12021-02-17 11:48:28 +010028intersphinx_mapping['onap-modeling-toscaparsers'] = (
29 '{}/onap-modeling-toscaparsers/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040030intersphinx_mapping['onap-modeling-modelspec'] = ('{}/onap-modeling-modelspec/en/%s'.format(doc_url) % branch, None)
31intersphinx_mapping['onap-vnfrqts-requirements'] = ('{}/onap-vnfrqts-requirements/en/%s'.format(doc_url) % branch, None)
32intersphinx_mapping['onap-vnfrqts-guidelines'] = ('{}/onap-vnfrqts-guidelines/en/%s'.format(doc_url) % branch, None)
Guillaume Lambert3931bb12021-02-17 11:48:28 +010033intersphinx_mapping['onap-dmaap-messagerouter-messageservice'] = (
34 '{}/onap-dmaap-messagerouter-messageservice/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040035intersphinx_mapping['onap-externalapi-nbi'] = ('{}/onap-externalapi-nbi/en/%s'.format(doc_url) % branch, None)
36intersphinx_mapping['onap-logging-analytics'] = ('{}/onap-logging-analytics/en/%s'.format(doc_url) % branch, None)
37intersphinx_mapping['onap-dmaap-buscontroller'] = ('{}/onap-dmaap-buscontroller/en/%s'.format(doc_url) % branch, None)
38intersphinx_mapping['onap-dmaap-datarouter'] = ('{}/onap-dmaap-datarouter/en/%s'.format(doc_url) % branch, None)
39intersphinx_mapping['onap-music'] = ('{}/onap-music/en/%s'.format(doc_url) % branch, None)
Guillaume Lambert3931bb12021-02-17 11:48:28 +010040intersphinx_mapping['onap-sdc-sdc-workflow-designer'] = (
41 '{}/onap-sdc-sdc-workflow-designer/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040042intersphinx_mapping['onap-sdc-sdc-tosca'] = ('{}/onap-sdc-sdc-tosca/en/%s'.format(doc_url) % branch, None)
43intersphinx_mapping['onap-vvp-documentation'] = ('{}/onap-vvp-documentation/en/%s'.format(doc_url) % branch, None)
Guillaume Lambert3931bb12021-02-17 11:48:28 +010044intersphinx_mapping['onap-logging-analytics-pomba-pomba-audit-common'] = (
45 '{}/onap-logging-analytics-pomba-pomba-audit-common/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040046intersphinx_mapping['onap-msb-apigateway'] = ('{}/onap-msb-apigateway/en/%s'.format(doc_url) % branch, None)
47intersphinx_mapping['onap-msb-discovery'] = ('{}/onap-msb-discovery/en/%s'.format(doc_url) % branch, None)
48intersphinx_mapping['onap-vnfrqts-testcases'] = ('{}/onap-vnfrqts-testcases/en/%s'.format(doc_url) % branch, None)
49intersphinx_mapping['onap-vnfrqts-usecases'] = ('{}/onap-vnfrqts-usecases/en/%s'.format(doc_url) % branch, None)
50intersphinx_mapping['onap-policy-parent'] = ('{}/onap-policy-parent/en/%s'.format(doc_url) % branch, None)
51intersphinx_mapping['onap-vfc-nfvo-lcm'] = ('{}/onap-vfc-nfvo-lcm/en/%s'.format(doc_url) % branch, None)
Guillaume Lambert3931bb12021-02-17 11:48:28 +010052intersphinx_mapping['onap-vfc-nfvo-driver-vnfm-svnfm'] = (
53 '{}/onap-vfc-nfvo-driver-vnfm-svnfm/en/%s'.format(doc_url) % branch, None)
54intersphinx_mapping['onap-holmes-rule-management'] = (
55 '{}/onap-holmes-rule-management/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040056intersphinx_mapping['onap-portal'] = ('{}/onap-portal/en/%s'.format(doc_url) % branch, None)
57intersphinx_mapping['onap-cli'] = ('{}/onap-cli/en/%s'.format(doc_url) % branch, None)
Guillaume Lambert3931bb12021-02-17 11:48:28 +010058intersphinx_mapping['onap-oom-platform-cert-service'] = (
59 '{}/onap-oom-platform-cert-service/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040060intersphinx_mapping['onap-ccsdk-cds'] = ('{}/onap-ccsdk-cds/en/%s'.format(doc_url) % branch, None)
61intersphinx_mapping['onap-ccsdk-apps'] = ('{}/onap-ccsdk-apps/en/%s'.format(doc_url) % branch, None)
elinuxhenrikb9438032020-09-21 15:40:03 +020062intersphinx_mapping['onap-ccsdk-oran'] = ('{}/onap-ccsdk-oran/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040063intersphinx_mapping['onap-sdnc-oam'] = ('{}/onap-sdnc-oam/en/%s'.format(doc_url) % branch, None)
Guillaume Lambert3931bb12021-02-17 11:48:28 +010064intersphinx_mapping['onap-ccsdk-platform-plugins'] = (
65 '{}/onap-ccsdk-platform-plugins/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040066intersphinx_mapping['onap-ccsdk-dashboard'] = ('{}/onap-ccsdk-dashboard/en/%s'.format(doc_url) % branch, None)
67intersphinx_mapping['onap-ccsdk-features'] = ('{}/onap-ccsdk-features/en/%s'.format(doc_url) % branch, None)
68intersphinx_mapping['onap-ccsdk-distribution'] = ('{}/onap-ccsdk-distribution/en/%s'.format(doc_url) % branch, None)
69intersphinx_mapping['onap-so-libs'] = ('{}/onap-so-libs/en/%s'.format(doc_url) % branch, None)
70intersphinx_mapping['onap-so'] = ('{}/onap-so/en/%s'.format(doc_url) % branch, None)
71intersphinx_mapping['onap-integration'] = ('{}/onap-integration/en/%s'.format(doc_url) % branch, None)
72intersphinx_mapping['onap-aai-aai-common'] = ('{}/onap-aai-aai-common/en/%s'.format(doc_url) % branch, None)
73intersphinx_mapping['onap-aaf-sms'] = ('{}/onap-aaf-sms/en/%s'.format(doc_url) % branch, None)
74intersphinx_mapping['onap-appc'] = ('{}/onap-appc/en/%s'.format(doc_url) % branch, None)
75intersphinx_mapping['onap-appc-deployment'] = ('{}/onap-appc-deployment/en/%s'.format(doc_url) % branch, None)
76intersphinx_mapping['onap-optf-cmso'] = ('{}/onap-optf-cmso/en/%s'.format(doc_url) % branch, None)
77intersphinx_mapping['onap-optf-osdf'] = ('{}/onap-optf-osdf/en/%s'.format(doc_url) % branch, None)
78intersphinx_mapping['onap-optf-has'] = ('{}/onap-optf-has/en/%s'.format(doc_url) % branch, None)
Guillaume Lambert3931bb12021-02-17 11:48:28 +010079intersphinx_mapping['onap-sdc-sdc-distribution-client'] = (
80 '{}/onap-sdc-sdc-distribution-client/en/%s'.format(doc_url) % branch, None)
Aric Gardner8a8832a2020-04-02 17:17:49 -040081intersphinx_mapping['onap-sdc-sdc-docker-base'] = ('{}/onap-sdc-sdc-docker-base/en/%s'.format(doc_url) % branch, None)
82intersphinx_mapping['onap-sdc'] = ('{}/onap-sdc/en/%s'.format(doc_url) % branch, None)
83intersphinx_mapping['onap-clamp'] = ('{}/onap-clamp/en/%s'.format(doc_url) % branch, None)
84intersphinx_mapping['onap-aai-event-client'] = ('{}/onap-aai-event-client/en/%s'.format(doc_url) % branch, None)
85intersphinx_mapping['onap-aai-sparky-be'] = ('{}/onap-aai-sparky-be/en/%s'.format(doc_url) % branch, None)
86intersphinx_mapping['onap-aai-esr-gui'] = ('{}/onap-aai-esr-gui/en/%s'.format(doc_url) % branch, None)
87intersphinx_mapping['onap-aai-esr-server'] = ('{}/onap-aai-esr-server/en/%s'.format(doc_url) % branch, None)
88intersphinx_mapping['onap-multicloud-k8s'] = ('{}/onap-multicloud-k8s/en/%s'.format(doc_url) % branch, None)
89intersphinx_mapping['onap-multicloud-framework'] = ('{}/onap-multicloud-framework/en/%s'.format(doc_url) % branch, None)
90intersphinx_mapping['onap-dcaegen2'] = ('{}/onap-dcaegen2/en/%s'.format(doc_url) % branch, None)
91intersphinx_mapping['onap-vnfsdk-model'] = ('{}/onap-vnfsdk-model/en/%s'.format(doc_url) % branch, None)
92intersphinx_mapping['onap-usecase-ui'] = ('{}/onap-usecase-ui/en/%s'.format(doc_url) % branch, None)
93intersphinx_mapping['onap-vid'] = ('{}/onap-vid/en/%s'.format(doc_url) % branch, None)
94intersphinx_mapping['onap-aaf-authz'] = ('{}/onap-aaf-authz/en/%s'.format(doc_url) % branch, None)
95
96
Guillaume Lambert5b9d80a2021-02-02 15:07:08 +010097linkcheck_ignore = [
Guillaume Lambert3931bb12021-02-17 11:48:28 +010098 'about:config',
99 # this URL is not directly reachable and must be configured in the system hosts file.
100 'https://portal.api.simpledemo.onap.org:30225/ONAPPORTAL/login.htm',
101 # anchor issues
102 'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases_release.html#.*',
103 'https://docs.linuxfoundation.org/docs/communitybridge/easycla/contributors/contribute-to-a-gerrit-project#.*',
104 'https://docs.onap.org/projects/onap-integration/en/latest/docs_robot.html#docs-robot',
105 'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases_release.html#docs-usecases-release',
106 'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases.html#docs-usecases',
107 'https://docs.onap.org/projects/onap-integration/en/latest/usecases/release_non_functional_requirements.html#release-non-functional-requirements',
Guillaume Lambert5b9d80a2021-02-02 15:07:08 +0100108]
Aric Gardner8a8832a2020-04-02 17:17:49 -0400109
110
Rich Bennett80455a52017-11-08 05:17:00 -0500111html_last_updated_fmt = '%d-%b-%y %H:%M'
Rich Bennett22ef0852017-07-19 18:05:55 -0400112
Guillaume Lambert3931bb12021-02-17 11:48:28 +0100113
Rich Bennett317d81a2018-09-11 07:38:05 -0400114def setup(app):
Guillaume Lambert3e25eeb2021-02-02 15:35:50 +0100115 app.add_css_file("css/ribbon.css")
Aric Gardnere2417212020-02-07 13:56:45 -0500116
117
Aric Gardnere2417212020-02-07 13:56:45 -0500118needs_extra_options = {
119 "target": directives.unchanged,
120 "keyword": directives.unchanged,
121 "introduced": directives.unchanged,
122 "updated": directives.unchanged,
123 "impacts": directives.unchanged,
124 "validation_mode": directives.unchanged,
125 "validated_by": directives.unchanged,
126 "test": directives.unchanged,
127 "test_case": directives.unchanged,
128 "test_file": directives.unchanged,
129 "notes": directives.unchanged,
130}
131
132needs_id_regex = "^[A-Z0-9]+-[A-Z0-9]+"
133needs_id_required = True
134needs_title_optional = True
135
136needs_template_collapse = """
137.. _{{id}}:
138
139{% if hide == false -%}
140.. role:: needs_tag
141.. role:: needs_status
142.. role:: needs_type
143.. role:: needs_id
144.. role:: needs_title
145
146.. rst-class:: need
147.. rst-class:: need_{{type_name}}
148
149.. container:: need
150
151 `{{id}}` - {{content|indent(4)}}
152
153 .. container:: toggle
154
155 .. container:: header
156
157 Details
158
159{% if status and status|upper != "NONE" and not hide_status %} | status: :needs_status:`{{status}}`{% endif %}
160{% if tags and not hide_tags %} | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %}
161{% if keyword %} | keyword: `{{keyword}}` {% endif %}
162{% if target %} | target: `{{target}}` {% endif %}
163{% if introduced %} | introduced: `{{introduced}}` {% endif %}
164{% if updated %} | updated: `{{updated}}` {% endif %}
165{% if impacts %} | impacts: `{{impacts}}` {% endif %}
166{% if validation_mode %} | validation mode: `{{validation_mode}}` {% endif %}
167{% if validated_by %} | validated by: `{{validated_by}}` {% endif %}
168{% if test %} | test: `{{test}}` {% endif %}
169{% if test_case %} | test case: {{test_case}} {% endif %}
170{% if test_file %} | test file: `{{test_file}}` {% endif %}
171{% if notes %} | notes: `{{notes}}` {% endif %}
172 | children: :need_incoming:`{{id}}`
173 | parents: :need_outgoing:`{{id}}`
174{% endif -%}
175"""