From bbb95d75e324ab55d1b807bfa2226eaa1b6e5936 Mon Sep 17 00:00:00 2001 From: Serg Melikyan Date: Thu, 4 Apr 2013 12:54:02 +0400 Subject: [PATCH] Documentation for Python PortasClient --- python-portasclient/README.rst | 7 ++++++ .../doc/source/_static/.placeholder | 0 .../doc/source/_templates/.placeholder | 0 .../doc/source/_theme/theme.conf | 2 ++ python-portasclient/doc/source/conf.py | 22 +++++++++++++------ python-portasclient/doc/source/index.rst | 4 ++-- 6 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 python-portasclient/README.rst create mode 100755 python-portasclient/doc/source/_static/.placeholder create mode 100755 python-portasclient/doc/source/_templates/.placeholder create mode 100755 python-portasclient/doc/source/_theme/theme.conf diff --git a/python-portasclient/README.rst b/python-portasclient/README.rst new file mode 100644 index 0000000..1deddd1 --- /dev/null +++ b/python-portasclient/README.rst @@ -0,0 +1,7 @@ +Keero Portas Client README +===================== +Portas Client provides CLI and Pythin bindings to Portas API. + +SEE ALSO +-------- +* `Keero `__ diff --git a/python-portasclient/doc/source/_static/.placeholder b/python-portasclient/doc/source/_static/.placeholder new file mode 100755 index 0000000..e69de29 diff --git a/python-portasclient/doc/source/_templates/.placeholder b/python-portasclient/doc/source/_templates/.placeholder new file mode 100755 index 0000000..e69de29 diff --git a/python-portasclient/doc/source/_theme/theme.conf b/python-portasclient/doc/source/_theme/theme.conf new file mode 100755 index 0000000..9a8facf --- /dev/null +++ b/python-portasclient/doc/source/_theme/theme.conf @@ -0,0 +1,2 @@ +[theme] +inherit = default \ No newline at end of file diff --git a/python-portasclient/doc/source/conf.py b/python-portasclient/doc/source/conf.py index 2b5d535..7d653c8 100644 --- a/python-portasclient/doc/source/conf.py +++ b/python-portasclient/doc/source/conf.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- # - import os -import sys project = 'python-portasclient' @@ -10,14 +8,23 @@ project = 'python-portasclient' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'] +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.intersphinx', + 'sphinx.ext.coverage', + 'sphinx.ext.pngmath', + 'sphinx.ext.ifconfig', + 'sphinx.ext.graphviz'] # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = [] +if os.getenv('HUDSON_PUBLISH_DOCS'): + templates_path = ['_ga', '_templates'] +else: + templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' @@ -26,7 +33,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -copyright = u'OpenStack LLC' +copyright = u'Mirantis, Inc' +exclude_trees = ['api'] # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True @@ -42,7 +50,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = 'nature' +html_theme = 'default' # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project @@ -56,7 +64,7 @@ latex_documents = [ 'index', '%s.tex' % project, u'%s Documentation' % project, - u'OpenStack LLC', + u'Mirantis, Inc', 'manual' ), ] diff --git a/python-portasclient/doc/source/index.rst b/python-portasclient/doc/source/index.rst index 085b863..91280a9 100644 --- a/python-portasclient/doc/source/index.rst +++ b/python-portasclient/doc/source/index.rst @@ -3,7 +3,7 @@ Python API In order to use the python api directly, you must first obtain an auth token and identify which endpoint you wish to speak to. Once you have done so, you can use the API like so:: >>> from portasclient import Client - >>> portas = Client('1', endpoint=OS_IMAGE_ENDPOINT, token=OS_AUTH_TOKEN) + >>> portas = Client('1', endpoint=PORTAS_URL, token=OS_AUTH_TOKEN) ... @@ -18,7 +18,7 @@ In order to use the CLI, you must provide your OpenStack username, password, ten The command line tool will attempt to reauthenticate using your provided credentials for every request. You can override this behavior by manually supplying an auth token using ``--os-image-url`` and ``--os-auth-token``. You can alternatively set these environment variables:: - export OS_IMAGE_URL=http://ceilometer.example.org:8004/ + export PORTAS_URL=http://portas.example.org:8082/ export OS_AUTH_TOKEN=3bcc3d3a03f44e3d8377f9247b0ad155 Once you've configured your authentication parameters, you can run ``portas help`` to see a complete listing of available commands.