From 0ef3370fffca54ae6cc065df63640d93d0996696 Mon Sep 17 00:00:00 2001 From: "Gode, Sebastian" Date: Fri, 12 May 2023 08:29:38 +0000 Subject: [PATCH] Service Based View Reviewed-by: Sarda, Priya Co-authored-by: Gode, Sebastian Co-committed-by: Gode, Sebastian --- api-ref/source/conf.py | 2 +- doc/requirements.txt | 5 +- doc/source/_static/placeholder | 0 doc/source/conf.py | 102 +++++++++++++++++++++++++++++++++ doc/source/index.rst | 14 +++++ tox.ini | 9 +++ umn/source/conf.py | 2 +- 7 files changed, 131 insertions(+), 3 deletions(-) create mode 100644 doc/source/_static/placeholder create mode 100644 doc/source/conf.py create mode 100644 doc/source/index.rst diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index c86fa49..be574f4 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -18,7 +18,7 @@ import os import sys extensions = [ - 'otcdocstheme' + 'otcdocstheme', ] otcdocs_auto_name = False diff --git a/doc/requirements.txt b/doc/requirements.txt index ea68e86..ea0c4de 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,4 +1,7 @@ sphinx>=2.0.0,!=2.1.0 # BSD otcdocstheme # Apache-2.0 # releasenotes -reno>=3.1.0 # Apache-2.0 \ No newline at end of file +reno>=3.1.0 # Apache-2.0 + +otc-sphinx-directives>=0.1.0 +git+https://gitea.eco.tsi-dev.otc-service.com/infra/otc-metadata.git#egg=otc_metadata \ No newline at end of file diff --git a/doc/source/_static/placeholder b/doc/source/_static/placeholder new file mode 100644 index 0000000..e69de29 diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 0000000..dcacace --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,102 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# !!! +# This file is generated out of template in doc-exports repository. +# Beware overwriting it locally. + +import os +import sys + +extensions = [ + 'otcdocstheme', + 'otc_sphinx_directives' +] + +otcdocs_auto_name = False +otcdocs_auto_version = False + +project = 'Virtual Private Cloud' +otcdocs_repo_name = 'docs/virtual-private-cloud' +# Those variables are required for edit/bug links +otcdocs_git_fqdn = 'gitea.eco.tsi-dev.otc-service.com' +otcdocs_git_type = 'gitea' + +# 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 +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath('../../')) +sys.path.insert(0, os.path.abspath('../')) +sys.path.insert(0, os.path.abspath('./')) + +# -- General configuration ---------------------------------------------------- +# https://docutils.sourceforge.io/docs/user/smartquotes.html - it does not +# what it is expected +smartquotes = False + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +# +source_encoding = 'utf-8' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +copyright = u'2022-present, Open Telekom Cloud' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +language = 'en' + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +show_authors = False + +# -- Options for HTML output -------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +# html_theme_path = ["."] +html_theme = 'otcdocs' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +html_theme_options = { + "disable_search": True, + "site_name": "Internal Documentation Portal", + "logo_url": "https://docs-int.otc-service.com", +} + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". + +html_title = "Virtual Private Cloud - Service Based View" + + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Do not include sources into the rendered results +html_copy_source = False + +# -- Options for PDF output -------------------------------------------------- +latex_documents = [] diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 0000000..e37ed59 --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,14 @@ +Virtual Private Cloud +===================== + +The Virtual Private Cloud (VPC) service enables you to provision logically isolated, configurable, and manageable virtual networks for Elastic Cloud Servers (ECSs), improving the security of resources in the cloud system and simplifying network deployment. + + +.. directive_wrapper:: + :class: container-sbv + + .. service_card:: + :service_type: vpc + :umn: This document describes Virtual Private Cloud service, helping you quickly create and properly use the service. + :api-ref: This document describes application programming interfaces (APIs) of Virtual Private Cloud (VPC) and provides API parameter description and example values. + diff --git a/tox.ini b/tox.ini index 2d14c78..3ca208b 100644 --- a/tox.ini +++ b/tox.ini @@ -29,7 +29,11 @@ allowlist_externals = mkdir cp sh + rm + sphinx-build commands = + rm -rf doc/build/html doc/build/doctrees + sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html {[testenv:api-ref]commands} {[testenv:json-api-ref]commands} {[testenv:umn]commands} @@ -138,3 +142,8 @@ commands = mkdir -p doc/build/pdf cp umn/build/pdf/vpc-umn.pdf doc/build/pdf/ + + +[doc8] +ignore = D001 +extensions = .rst, .yaml \ No newline at end of file diff --git a/umn/source/conf.py b/umn/source/conf.py index 76ccc61..203841c 100644 --- a/umn/source/conf.py +++ b/umn/source/conf.py @@ -18,7 +18,7 @@ import os import sys extensions = [ - 'otcdocstheme' + 'otcdocstheme', ] otcdocs_auto_name = False