update scripts for latest templates
This commit is contained in:
		@ -74,9 +74,10 @@ documents:
 | 
			
		||||
  - hc_location: bpicg/bms
 | 
			
		||||
    html_location: docs/bms/image-creation-guide
 | 
			
		||||
    pdf_name: bms-image-creation-guide
 | 
			
		||||
    rst_location: doc/image-creation-guide
 | 
			
		||||
    rst_location: doc/image-creation-guide/source
 | 
			
		||||
    service_type: bms
 | 
			
		||||
    title: Private Image Creation Guide
 | 
			
		||||
    type: image-creation-guide
 | 
			
		||||
  - hc_location: usermanual/bms
 | 
			
		||||
    html_location: docs/bms/umn
 | 
			
		||||
    link: /umn/bare-metal-server/
 | 
			
		||||
@ -112,7 +113,7 @@ documents:
 | 
			
		||||
  - hc_location: usermanual2/cce
 | 
			
		||||
    html_location: docs/cce/umn
 | 
			
		||||
    link: /umn/cloud-container-engine/
 | 
			
		||||
    pdf_name: cce-umn
 | 
			
		||||
    # pdf_name: cce-umn
 | 
			
		||||
    rst_location: umn/source
 | 
			
		||||
    service_type: cce
 | 
			
		||||
    title: User Guide
 | 
			
		||||
@ -355,6 +356,7 @@ documents:
 | 
			
		||||
    rst_location: doc/tool/source
 | 
			
		||||
    service_type: dws
 | 
			
		||||
    title: Tool Guide
 | 
			
		||||
    type: tool-guide
 | 
			
		||||
  - hc_location: usermanual/dws
 | 
			
		||||
    html_location: docs/dws/umn
 | 
			
		||||
    link: /umn/data-warehouse-service/
 | 
			
		||||
@ -392,6 +394,7 @@ documents:
 | 
			
		||||
    rst_location: umn/source
 | 
			
		||||
    service_type: edb
 | 
			
		||||
    title: User Guide
 | 
			
		||||
    type: manual
 | 
			
		||||
  - hc_location: api/eip
 | 
			
		||||
    html_location: docs/eip/api-ref
 | 
			
		||||
    link: /api-ref/elastic-ip/
 | 
			
		||||
@ -509,9 +512,10 @@ documents:
 | 
			
		||||
    type: dev
 | 
			
		||||
  - html_location: docs/ims/public-images
 | 
			
		||||
    pdf_name: ims-public-images
 | 
			
		||||
    rst_location: docs/ims/public-images
 | 
			
		||||
    rst_location: doc/public-images/source
 | 
			
		||||
    service_type: ims
 | 
			
		||||
    title: Public Image Introduction
 | 
			
		||||
    type: public-images
 | 
			
		||||
  - hc_location: usermanual/ims
 | 
			
		||||
    html_location: docs/ims/umn
 | 
			
		||||
    link: /umn/image-management-service/
 | 
			
		||||
@ -579,9 +583,10 @@ documents:
 | 
			
		||||
  - hc_location: cmpntguide/mrs
 | 
			
		||||
    html_location: docs/mrs/component-operation-guide
 | 
			
		||||
    pdf_name: mrs-component-operation-guide
 | 
			
		||||
    rst_location: docs/mrs/component-operation-guide
 | 
			
		||||
    rst_location: doc/component-operation-guide/source
 | 
			
		||||
    service_type: mrs
 | 
			
		||||
    title: Component Operation Guide
 | 
			
		||||
    type: operation-guide
 | 
			
		||||
  - hc_location: usermanual/mrs
 | 
			
		||||
    html_location: docs/mrs/umn
 | 
			
		||||
    link: /umn/mapreduce-service/
 | 
			
		||||
@ -628,13 +633,7 @@ documents:
 | 
			
		||||
    rst_location: doc/s3api/source
 | 
			
		||||
    service_type: obs
 | 
			
		||||
    title: S3 API Reference
 | 
			
		||||
  - doc_type: s3cmd
 | 
			
		||||
    hc_location: ugs3cmd/obs
 | 
			
		||||
    html_location: docs/obs/s3cmd
 | 
			
		||||
    pdf_name: obs-s3cmd
 | 
			
		||||
    rst_location: doc/s3cmd/source
 | 
			
		||||
    service_type: obs
 | 
			
		||||
    title: Third-Party Client (s3cmd)
 | 
			
		||||
    type: s3api
 | 
			
		||||
  - hc_location: usermanual/obs
 | 
			
		||||
    html_location: docs/obs/umn
 | 
			
		||||
    link: /umn/object-storage-service/
 | 
			
		||||
@ -757,12 +756,6 @@ documents:
 | 
			
		||||
    service_type: sfs
 | 
			
		||||
    title: API Reference
 | 
			
		||||
    type: api-ref
 | 
			
		||||
  - hc_location: api_cli/sfs
 | 
			
		||||
    html_location: docs/sfs/cli
 | 
			
		||||
    pdf_name: sfs-cli
 | 
			
		||||
    rst_location: doc/cli/source
 | 
			
		||||
    service_type: sfs
 | 
			
		||||
    title: Manila Client Reference
 | 
			
		||||
  - hc_location: usermanual/sfs
 | 
			
		||||
    html_location: docs/sfs/umn
 | 
			
		||||
    link: /umn/scalable-file-service/
 | 
			
		||||
 | 
			
		||||
@ -195,8 +195,9 @@ class Services(object):
 | 
			
		||||
                        rst_location=doc["rst_location"],
 | 
			
		||||
                        title=doc["title"],
 | 
			
		||||
                        type=doc.get("type", "dummy"),
 | 
			
		||||
                        pdf_name=doc["pdf_name"],
 | 
			
		||||
                    )
 | 
			
		||||
                    if "pdf_name" in doc:
 | 
			
		||||
                        doc_res["pdf_name"] = doc["pdf_name"]
 | 
			
		||||
                    if "hc_location" in doc:
 | 
			
		||||
                        doc_res["hc_location"] = doc["hc_location"]
 | 
			
		||||
                    srv_res["docs"].append(doc_res)
 | 
			
		||||
 | 
			
		||||
@ -27,12 +27,12 @@ otcdocs_auto_version = False
 | 
			
		||||
project = '{{ project }}'
 | 
			
		||||
otcdocs_repo_name = '{{ repo_name }}'
 | 
			
		||||
# Those variables are required for edit/bug links
 | 
			
		||||
{% if git_fqdn -%}
 | 
			
		||||
{%- if git_fqdn %}
 | 
			
		||||
otcdocs_git_fqdn = '{{ git_fqdn }}'
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% if git_type -%}
 | 
			
		||||
{%- endif %}
 | 
			
		||||
{%- if git_type %}
 | 
			
		||||
otcdocs_git_type = '{{ git_type }}'
 | 
			
		||||
{% endif %}
 | 
			
		||||
{%- endif %}
 | 
			
		||||
 | 
			
		||||
# If extensions (or modules to document with autodoc) are in another directory,
 | 
			
		||||
# add these directories to sys.path here. If the directory is relative to the
 | 
			
		||||
@ -82,6 +82,15 @@ html_theme = 'otcdocs'
 | 
			
		||||
# further. For a list of options available for each theme, see the
 | 
			
		||||
# documentation.
 | 
			
		||||
html_theme_options = {
 | 
			
		||||
{%- if html_options is defined -%}
 | 
			
		||||
{%- for (k, v) in html_options.items() %}
 | 
			
		||||
{%- if v is boolean %}
 | 
			
		||||
    "{{ k }}": {{ v }},
 | 
			
		||||
{%- else %}
 | 
			
		||||
    "{{ k }}": "{{ v }}",
 | 
			
		||||
{%- endif %}
 | 
			
		||||
{%- endfor %}
 | 
			
		||||
{%- endif %}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# The name for this set of Sphinx documents.  If None, it defaults to
 | 
			
		||||
@ -97,10 +106,11 @@ html_static_path = ['_static']
 | 
			
		||||
 | 
			
		||||
# -- Options for PDF output --------------------------------------------------
 | 
			
		||||
latex_documents = [
 | 
			
		||||
{% if pdf_name is defined -%}
 | 
			
		||||
{%- if pdf_name is defined %}
 | 
			
		||||
    ('index',
 | 
			
		||||
     '{{ pdf_name }}.tex',
 | 
			
		||||
     u'{{ title }}',
 | 
			
		||||
     u'OpenTelekomCloud', 'manual'),
 | 
			
		||||
{% endif -%}
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								otc_metadata/templates/doc_requirements.txt.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								otc_metadata/templates/doc_requirements.txt.j2
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
sphinx>=2.0.0,!=2.1.0 # BSD
 | 
			
		||||
otcdocstheme # Apache-2.0
 | 
			
		||||
# releasenotes
 | 
			
		||||
reno>=3.1.0 # Apache-2.0
 | 
			
		||||
							
								
								
									
										77
									
								
								otc_metadata/templates/tox.ini.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								otc_metadata/templates/tox.ini.j2
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,77 @@
 | 
			
		||||
[tox]
 | 
			
		||||
minversion = 3.1
 | 
			
		||||
envlist = py39,pep8
 | 
			
		||||
skipsdist = True
 | 
			
		||||
ignore_basepython_conflict = True
 | 
			
		||||
 | 
			
		||||
[testenv]
 | 
			
		||||
usedevelop = True
 | 
			
		||||
install_command = pip install {opts} {packages}
 | 
			
		||||
deps =
 | 
			
		||||
  -r{toxinidir}/requirements.txt
 | 
			
		||||
commands = stestr run {posargs}
 | 
			
		||||
  stestr slowest
 | 
			
		||||
 | 
			
		||||
[testenv:pep8]
 | 
			
		||||
commands =
 | 
			
		||||
  doc8 doc/source README.rst
 | 
			
		||||
 | 
			
		||||
[testenv:venv]
 | 
			
		||||
deps =
 | 
			
		||||
  -r{toxinidir}/requirements.txt
 | 
			
		||||
commands = {posargs}
 | 
			
		||||
 | 
			
		||||
[testenv:docs]
 | 
			
		||||
commands =
 | 
			
		||||
{%- for doc in docs %}
 | 
			
		||||
  {[testenv:{{ doc.type }}]commands}
 | 
			
		||||
{%- endfor %}
 | 
			
		||||
 | 
			
		||||
[testenv:docs-pdf]
 | 
			
		||||
whitelist_externals =
 | 
			
		||||
  mkdir
 | 
			
		||||
commands =
 | 
			
		||||
  mkdir -p doc/build/pdf
 | 
			
		||||
{%- for doc in docs %}
 | 
			
		||||
{%- if doc.pdf_name %}
 | 
			
		||||
  {[testenv:{{ doc.type }}-pdf-docs]commands}
 | 
			
		||||
{%- endif %}
 | 
			
		||||
{%- endfor %}
 | 
			
		||||
 | 
			
		||||
{% for doc in docs -%}
 | 
			
		||||
{% set loc = doc.rst_location | replace('/source', '') %}
 | 
			
		||||
[testenv:{{ doc.type }}]
 | 
			
		||||
whitelist_externals =
 | 
			
		||||
  cp
 | 
			
		||||
  mkdir
 | 
			
		||||
commands =
 | 
			
		||||
  sphinx-build -W --keep-going -b html {{ loc }}/source doc/build/html/{{ doc.type }}
 | 
			
		||||
{%- if doc.type == 'api-ref' %}
 | 
			
		||||
  mkdir -p api-ref/build/html
 | 
			
		||||
  cp -av doc/build/html/api-ref api-ref/build/html
 | 
			
		||||
{%- elif doc.type == 'umn' %}
 | 
			
		||||
  mkdir -p umn/build/html
 | 
			
		||||
  cp -av doc/build/html/umn umn/build/html
 | 
			
		||||
{%- elif doc.type == 'dev-guide' %}
 | 
			
		||||
  mkdir -p dev_guide/build/html
 | 
			
		||||
  cp -av doc/build/html/dev-guide dev_guide/build/html
 | 
			
		||||
{%- endif %}
 | 
			
		||||
 | 
			
		||||
{% if doc.pdf_name -%}
 | 
			
		||||
[testenv:{{ doc.type }}-pdf-docs]
 | 
			
		||||
whitelist_externals =
 | 
			
		||||
  rm
 | 
			
		||||
  mkdir
 | 
			
		||||
  make
 | 
			
		||||
  bash
 | 
			
		||||
  cp
 | 
			
		||||
commands =
 | 
			
		||||
  rm -rf {{ loc }}/build/pdf
 | 
			
		||||
  sphinx-build -W --keep-going -b latex {{ loc }}/source {{ loc }}/build/pdf/
 | 
			
		||||
  bash -c "for f in {{ loc }}/build/pdf/*.gif; do convert $f $\{f/%gif/png\}; done || true"
 | 
			
		||||
  bash -c "for f in {{ loc }}/build/pdf/*.tex; do sed -iorig 's/\.gif//g' $f; done"
 | 
			
		||||
  make -C {{ loc }}/build/pdf
 | 
			
		||||
  mkdir -p doc/build/pdf
 | 
			
		||||
  cp {{ loc }}/build/pdf/{{ doc.pdf_name }}.pdf doc/build/pdf/
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% endfor %}
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user