From 060361fb11819ef7510b4559d5308f15283e0b7d Mon Sep 17 00:00:00 2001 From: Nguyen Hai Date: Tue, 29 May 2018 19:27:44 +0900 Subject: [PATCH] Switch from oslosphinx to openstackdocstheme - Change to openstackdocstheme which is a theme and extension support for Sphinx documentation that is published to docs.openstack.org and developer.openstack.org. - This patch also updates README.rst Change-Id: I5922eb9b0f5835be65a5ba3eead78bdf92458452 --- README.rst | 6 +++--- doc/source/conf.py | 10 ++-------- doc/source/contributing.rst | 6 +++++- doc/source/index.rst | 3 ++- doc/source/usage.rst | 3 +++ lower-constraints.txt | 1 + test-requirements.txt | 2 +- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/README.rst b/README.rst index c8af42aa..2e943a81 100644 --- a/README.rst +++ b/README.rst @@ -2,8 +2,8 @@ Team and repository tags ======================== -.. image:: http://governance.openstack.org/badges/heat-translator.svg - :target: http://governance.openstack.org/reference/tags/index.html +.. image:: https://governance.openstack.org/tc/badges/heat-translator.svg + :target: https://governance.openstack.org/tc/reference/tags/index.html .. Change things from this point on @@ -48,7 +48,7 @@ Project Info ------------ * License: Apache License, Version 2.0 -* Documentation: http://docs.openstack.org/developer/heat-translator/ +* Documentation: http://docs.openstack.org/heat-translator/ * Launchpad: https://launchpad.net/heat-translator * Blueprints: https://blueprints.launchpad.net/heat-translator * Bugs: https://bugs.launchpad.net/heat-translator diff --git a/doc/source/conf.py b/doc/source/conf.py index e051aeb9..4a4d2755 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -21,8 +21,7 @@ sys.path.insert(0, os.path.abspath('../..')) # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinx.ext.autodoc', - #'sphinx.ext.intersphinx', - 'oslosphinx' + 'openstackdocstheme' ] # autodoc generation is a bit aggressive and a nuisance when doing heavy @@ -50,12 +49,7 @@ add_module_names = True pygments_style = 'sphinx' # -- 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 = 'default' -# html_static_path = ['static'] +html_theme = 'openstackdocs' # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index 8cb3146f..1f5ca23c 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -1 +1,5 @@ -.. include:: ../../CONTRIBUTING.rst \ No newline at end of file +============ +Contributing +============ + +.. include:: ../../CONTRIBUTING.rst diff --git a/doc/source/index.rst b/doc/source/index.rst index dd3f04f2..9ad8ba7e 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -13,6 +13,7 @@ to HOT. However, the tool can be easily extended to support any non-heat template format to produce HOT. Contents: +--------- .. toctree:: :maxdepth: 2 @@ -22,7 +23,7 @@ Contents: contributing Indices and tables -================== +------------------ * :ref:`genindex` * :ref:`modindex` diff --git a/doc/source/usage.rst b/doc/source/usage.rst index 5a94cee7..198f1d95 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -60,6 +60,7 @@ optional argument. The command below shows an example usage:: Alternatively, you can install a particular release of Heat-Translator as available at https://pypi.org/project/heat-translator. In this case, you can simply run translation via CLI entry point:: + heat-translator --template-file=translator/tests/data/tosca_helloworld.yaml --template-type=tosca Things To Consider @@ -82,7 +83,9 @@ Things To Consider This can be achieved by providing ``--deploy`` argument to the Heat-Translator. You can provide desired stack name by providing it as ``--stack-name `` argument. If you do not provide ``--stack-name``, an unique name will be created and used. Below is an example command to deploy translated template with a desired stack name:: + heat-translator --template-file translator/tests/data/tosca_helloworld.yaml --stack-name mystack --deploy + * The Heat-Translator supports translation of TOSCA templates to Heat Senlin resources (e.g. ``OS::Senlin::Cluster``) but that requires to use a specific TOSCA node type called ``tosca.policies.Scaling.Cluster``. diff --git a/lower-constraints.txt b/lower-constraints.txt index f14e6787..a1652169 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -35,6 +35,7 @@ msgpack-python==0.4.0 munch==2.1.0 netaddr==0.7.18 netifaces==0.10.4 +openstackdocstheme==1.18.1 openstacksdk==0.11.2 os-client-config==1.28.0 os-service-types==1.2.0 diff --git a/test-requirements.txt b/test-requirements.txt index adf41b80..e46ebf28 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,7 +5,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD oslotest>=3.2.0 # Apache-2.0 -oslosphinx>=4.7.0 # Apache-2.0 +openstackdocstheme>=1.18.1 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD testrepository>=0.0.18 # Apache-2.0/BSD