Rework sushy documentation for doc migration

Also, edited docstrings in one of the source code files
as they were generating errors for sphinx with autodoc
which was not previously enabled.

Depends-On: Ie380d2a38e9ca62b8f8f4e2ed1c40f5d717348ee
Change-Id: I77ef3dee7ae4d94e40fa01f80937ae7aa06c8204
This commit is contained in:
Julia Kreger 2017-07-17 19:37:16 +00:00
parent acb9536f1e
commit 5d08828530
9 changed files with 62 additions and 43 deletions

1
.gitignore vendored
View File

@ -44,6 +44,7 @@ output/*/index.html
# Sphinx # Sphinx
doc/build doc/build
doc/source/reference/api
# pbr generates these # pbr generates these
AUTHORS AUTHORS

View File

@ -1,6 +1,5 @@
===== About Sushy
Sushy ===========
=====
Sushy is a Python library to communicate with `Redfish`_ based systems. Sushy is a Python library to communicate with `Redfish`_ based systems.
@ -14,9 +13,9 @@ project. As the project grows and more features from `Redfish`_ are
needed we can expand Sushy to fullfil those requirements. needed we can expand Sushy to fullfil those requirements.
* Free software: Apache license * Free software: Apache license
* Documentation: http://sushy.rtfd.io * Documentation: https://docs.openstack.org/sushy/latest/
* Usage: http://sushy.readthedocs.io/en/latest/usage.html * Usage: https://docs.openstack.org/sushy/latest/reference/usage.html
* Source: http://git.openstack.org/cgit/openstack/sushy * Source: https://git.openstack.org/cgit/openstack/sushy
* Bugs: http://bugs.launchpad.net/sushy * Bugs: https://bugs.launchpad.net/sushy
.. _Redfish: http://www.dmtf.org/standards/redfish .. _Redfish: http://www.dmtf.org/standards/redfish

View File

@ -1,9 +1,12 @@
.. _contributing: .. _contributing:
============ =====================
Contributing Contributing to Sushy
============ =====================
.. include:: ../../CONTRIBUTING.rst
How to contribute
=================
.. include:: ../../../CONTRIBUTING.rst
Running a Redfish emulator Running a Redfish emulator

View File

@ -3,23 +3,20 @@
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
=================================
Welcome to Sushy's documentation! Welcome to Sushy's documentation!
================================= =================================
Contents: .. include:: ../../README.rst
Documentation
=============
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 1
About Sushy <readme> install/index
installation contributor/index
usage reference/index
contributing
Indices and tables
==================
* :ref:`genindex` * :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -1,6 +1,6 @@
============ ================
Installation Installing Sushy
============ ================
At the command line:: At the command line::

View File

@ -1,7 +1,9 @@
.. include:: ../../README.rst =======================
Sushy Library Reference
=======================
Features Features
-------- ========
* Abstraction around the SystemCollection and System resources (Basic * Abstraction around the SystemCollection and System resources (Basic
server identification and asset information) server identification and asset information)
@ -9,11 +11,27 @@ Features
* Changing systems boot device, frequency (Once or permanently) and mode * Changing systems boot device, frequency (Once or permanently) and mode
(UEFI or BIOS) (UEFI or BIOS)
Check out the :ref:`usage` page. .. toctree::
:maxdepth: 2
TODO usage
----
Missing Features
================
These are some features that sushy is presently missing.
* Collect sensor data (Health state, temperature, fans etc...) * Collect sensor data (Health state, temperature, fans etc...)
* System inspection (Number of CPUs, memory and disk size) * System inspection (Number of CPUs, memory and disk size)
* Serial console * Serial console
Sushy Python API Reference
==========================
* :ref:`modindex`
.. # api/autoindex is hidden since it's in the modindex link above.
.. toctree::
:hidden:
api/autoindex

View File

@ -1,8 +1,7 @@
.. _usage: .. _usage:
===== Usaging Sushy
Usage =============
=====
To use sushy in a project: To use sushy in a project:

View File

@ -49,3 +49,9 @@ output_file = sushy/locale/sushy.pot
all_files = 1 all_files = 1
build-dir = releasenotes/build build-dir = releasenotes/build
source-dir = releasenotes/source source-dir = releasenotes/source
[pbr]
autodoc_index_modules = True
api_doc_dir = reference/api
autodoc_exclude_modules =
sushy.tests.*

View File

@ -77,10 +77,7 @@ class ProcessorCollection(base.ResourceCollectionBase):
return Processor return Processor
_summary = None _summary = None
"""The summary of processors of the system in general detail """The summary of processors of the system in general detail"""
This has to be accessed by exposed :prop:`summary`.
"""
@property @property
def summary(self): def summary(self):
@ -88,10 +85,9 @@ class ProcessorCollection(base.ResourceCollectionBase):
It is calculated once when the first time it is queried. On refresh, It is calculated once when the first time it is queried. On refresh,
this property gets reset. this property gets reset.
:returns: A namedtuple containing the following:
count: The number of processors in the system. To be precise, :returns: A namedtuple containing the ``count`` of processors
it returns the number of logical CPUs (threads). in regards to logical CPUs, and their ``architecture``.
architecture: The architecture of the processor/s.
""" """
if self._summary is None: if self._summary is None:
count, architecture = 0, None count, architecture = 0, None