Add some documentation
This commit is contained in:
parent
d263c9ae17
commit
f2edf8df84
@ -14,4 +14,4 @@ Pull requests submitted through GitHub will be ignored.
|
||||
|
||||
Bugs should be filed on Launchpad, not GitHub:
|
||||
|
||||
https://bugs.launchpad.net/python-almanachclient
|
||||
https://bugs.launchpad.net/almanach
|
||||
|
@ -56,7 +56,7 @@ class AlmanachApp(app.App):
|
||||
help='Keystone V3 URL (Env: OS_AUTH_URL).')
|
||||
|
||||
parser.add_argument('--os-region-name',
|
||||
default=os.environ.get('OS_REGION_NAME'),
|
||||
default=os.environ.get('`'),
|
||||
help='OpenStack region name (Env: OS_REGION_NAME).')
|
||||
|
||||
parser.add_argument('--os-password',
|
||||
|
@ -22,8 +22,6 @@ 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'
|
||||
]
|
||||
|
||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||
@ -38,7 +36,7 @@ master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'python-almanachclient'
|
||||
copyright = u'2016, OpenStack Foundation'
|
||||
copyright = u'%d, OpenStack Foundation'
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
add_function_parentheses = True
|
||||
@ -50,26 +48,7 @@ add_module_names = True
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
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 = '_theme'
|
||||
# html_static_path = ['static']
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = '%sdoc' % project
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass
|
||||
# [howto/manual]).
|
||||
latex_documents = [
|
||||
('index',
|
||||
'%s.tex' % project,
|
||||
u'%s Documentation' % project,
|
||||
u'OpenStack Foundation', 'manual'),
|
||||
]
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
#intersphinx_mapping = {'http://docs.python.org/': None}
|
||||
html_theme = 'default'
|
||||
|
@ -1,10 +1,5 @@
|
||||
.. python-almanachclient documentation master file, created by
|
||||
sphinx-quickstart on Tue Jul 9 22:26:36 2013.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to python-almanachclient's documentation!
|
||||
========================================================
|
||||
Almanach Client
|
||||
===============
|
||||
|
||||
Contents:
|
||||
|
||||
@ -15,11 +10,3 @@ Contents:
|
||||
installation
|
||||
usage
|
||||
contributing
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
||||
|
@ -6,7 +6,3 @@ At the command line::
|
||||
|
||||
$ pip install python-almanachclient
|
||||
|
||||
Or, if you have virtualenvwrapper installed::
|
||||
|
||||
$ mkvirtualenv python-almanachclient
|
||||
$ pip install python-almanachclient
|
||||
|
@ -1,7 +1,45 @@
|
||||
========
|
||||
Usage
|
||||
========
|
||||
Command Line Usage
|
||||
==================
|
||||
|
||||
To use python-almanachclient in a project::
|
||||
Environment variables
|
||||
---------------------
|
||||
|
||||
import almanachclient
|
||||
* `OS_AUTH_URL`: Keystone URL (v3 endpoint)
|
||||
* `OS_AUTH_URL`: OpenStack region name
|
||||
* `OS_USERNAME`: OpenStack username
|
||||
* `OS_PASSWORD`: OpenStack password
|
||||
* `ALMANACH_SERVICE`: Almanach catalog service name
|
||||
* `ALMANACH_TOKEN`: Almanach private key
|
||||
|
||||
Get server version
|
||||
------------------
|
||||
|
||||
.. code:: bash
|
||||
|
||||
almanach-client version
|
||||
|
||||
4.0.9
|
||||
|
||||
Get Endpoint URL
|
||||
----------------
|
||||
|
||||
.. code:: bash
|
||||
|
||||
almanach-client endpoint
|
||||
|
||||
http://almanach.example.org
|
||||
|
||||
Get tenant entities
|
||||
-------------------
|
||||
|
||||
.. code:: bash
|
||||
|
||||
almanach-client tenant entities bca89ae64dba46b8b74653d8d9ae8364 2016-01-01 2017-05-30
|
||||
|
||||
+--------------------------------------+----------+--------+---------------------------+------+---------------------------------------------------------------------------------------+
|
||||
| Entity ID | Type | Name | Start | End | Properties |
|
||||
+--------------------------------------+----------+--------+---------------------------+------+---------------------------------------------------------------------------------------+
|
||||
| 8c3bc3aa-28d6-4863-b5ae-72e1b415f79d | instance | vm01 | 2017-05-09 14:19:14+00:00 | None | {'image': {'distro': 'centos', 'version': '7', 'os_type': 'linux'}, 'flavor': 'A1.1'} |
|
||||
| f0690323-c394-4848-a272-964aad6431aa | instance | vm02 | 2017-05-15 18:31:42+00:00 | None | {'image': {'distro': 'centos', 'version': '7', 'os_type': 'linux'}, 'flavor': 'A1.1'} |
|
||||
| 3e3b22e6-a10c-4c00-b8e5-05fcc8422b11 | volume | vol01 | 2017-05-15 19:11:14+00:00 | None | {'attached_to': [], 'volume_type': 'solidfire0'} |
|
||||
+--------------------------------------+----------+--------+---------------------------+------+---------------------------------------------------------------------------------------+
|
||||
|
14
setup.cfg
14
setup.cfg
@ -33,20 +33,6 @@ all_files = 1
|
||||
[upload_sphinx]
|
||||
upload-dir = doc/build/html
|
||||
|
||||
[compile_catalog]
|
||||
directory = almanachclient/locale
|
||||
domain = almanachclient
|
||||
|
||||
[update_catalog]
|
||||
domain = almanachclient
|
||||
output_dir = almanachclient/locale
|
||||
input_file = almanachclient/locale/almanachclient.pot
|
||||
|
||||
[extract_messages]
|
||||
keywords = _ gettext ngettext l_ lazy_gettext
|
||||
mapping_file = babel.cfg
|
||||
output_file = almanachclient/locale/almanachclient.pot
|
||||
|
||||
[build_releasenotes]
|
||||
all_files = 1
|
||||
build-dir = releasenotes/build
|
||||
|
Loading…
x
Reference in New Issue
Block a user