Update the documentation for os-brick
This patch intends to update the base documenation that is built for the os-brick library. It includes the API documentation, changelog, tutorial. You can generate the documentation by running: tox -edocs DocImpact Change-Id: Ia0fe0118207bbdc3cf698dfe09c0b71ebddd57f3
This commit is contained in:
parent
2dc39e83d0
commit
b3a392e5a2
|
@ -13,4 +13,4 @@ Pull requests submitted through GitHub will be ignored.
|
||||||
|
|
||||||
Bugs should be filed on Launchpad, not GitHub:
|
Bugs should be filed on Launchpad, not GitHub:
|
||||||
|
|
||||||
https://bugs.launchpad.net/brick
|
https://bugs.launchpad.net/os-brick
|
||||||
|
|
|
@ -5,11 +5,12 @@ brick
|
||||||
OpenStack Cinder brick library for managing local volume attaches
|
OpenStack Cinder brick library for managing local volume attaches
|
||||||
|
|
||||||
* Free software: Apache license
|
* Free software: Apache license
|
||||||
* Documentation: http://docs.openstack.org/developer/brick
|
* Documentation: http://docs.openstack.org/developer/os-brick
|
||||||
* Source: http://git.openstack.org/cgit/openstack/brick
|
* Source: http://git.openstack.org/cgit/openstack/os-brick
|
||||||
* Bugs: http://bugs.launchpad.net/cinder
|
* Bugs: http://bugs.launchpad.net/cinder
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* TODO
|
* Discovery of volumes being attached to a host for many transport protocols.
|
||||||
|
* Removal of volumes from a host.
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
API Documentation
|
||||||
|
=================
|
||||||
|
|
||||||
|
The **os-brick** package provides the ability to collect host initiator
|
||||||
|
information as well as discovery volumes and removal of volumes from a host.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
os_brick/index
|
|
@ -0,0 +1,14 @@
|
||||||
|
:mod:`exception` -- Exceptions
|
||||||
|
==============================
|
||||||
|
|
||||||
|
.. automodule:: os_brick.exception
|
||||||
|
:synopsis: Exceptions generated by os-brick
|
||||||
|
|
||||||
|
.. autoclass:: os_brick.exception.BrickException
|
||||||
|
.. autoclass:: os_brick.exception.NotFound
|
||||||
|
.. autoclass:: os_brick.exception.Invalid
|
||||||
|
.. autoclass:: os_brick.exception.InvalidParameterValue
|
||||||
|
.. autoclass:: os_brick.exception.NoFibreChannelHostsFound
|
||||||
|
.. autoclass:: os_brick.exception.NoFibreChannelVolumeDeviceFound
|
||||||
|
.. autoclass:: os_brick.exception.VolumeDeviceNotFound
|
||||||
|
.. autoclass:: os_brick.exception.ProtocolNotSupported
|
|
@ -0,0 +1,14 @@
|
||||||
|
:mod:`os_brick` -- OpenStack Brick library
|
||||||
|
==========================================
|
||||||
|
|
||||||
|
.. automodule:: os_brick
|
||||||
|
:synopsis: OpenStack Brick library
|
||||||
|
|
||||||
|
|
||||||
|
Sub-modules:
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
initiator/index
|
||||||
|
exception
|
|
@ -0,0 +1,39 @@
|
||||||
|
:mod:`connector` -- Connector
|
||||||
|
=============================
|
||||||
|
|
||||||
|
.. automodule:: os_brick.initiator.connector
|
||||||
|
:synopsis: Connector module for os-brick
|
||||||
|
|
||||||
|
.. autoclass:: os_brick.initiator.connector.InitiatorConnector
|
||||||
|
|
||||||
|
.. automethod:: factory
|
||||||
|
|
||||||
|
.. autoclass:: os_brick.initiator.connector.ISCSIConnector
|
||||||
|
|
||||||
|
.. automethod:: connect_volume
|
||||||
|
.. automethod:: disconnect_volume
|
||||||
|
|
||||||
|
.. autoclass:: os_brick.initiator.connector.ISERConnector
|
||||||
|
|
||||||
|
.. automethod:: connect_volume
|
||||||
|
.. automethod:: disconnect_volume
|
||||||
|
|
||||||
|
.. autoclass:: os_brick.initiator.connector.FibreChannelConnector
|
||||||
|
|
||||||
|
.. automethod:: connect_volume
|
||||||
|
.. automethod:: disconnect_volume
|
||||||
|
|
||||||
|
.. autoclass:: os_brick.initiator.connector.AoEConnector
|
||||||
|
|
||||||
|
.. automethod:: connect_volume
|
||||||
|
.. automethod:: disconnect_volume
|
||||||
|
|
||||||
|
.. autoclass:: os_brick.initiator.connector.LocalConnector
|
||||||
|
|
||||||
|
.. automethod:: connect_volume
|
||||||
|
.. automethod:: disconnect_volume
|
||||||
|
|
||||||
|
.. autoclass:: os_brick.initiator.connector.HuaweiStorHyperConnector
|
||||||
|
|
||||||
|
.. automethod:: connect_volume
|
||||||
|
.. automethod:: disconnect_volume
|
|
@ -0,0 +1,13 @@
|
||||||
|
:mod:`initiator` -- Initiator
|
||||||
|
=============================
|
||||||
|
|
||||||
|
.. automodule:: os_brick.initiator
|
||||||
|
:synopsis: Initiator module
|
||||||
|
|
||||||
|
|
||||||
|
Sub-modules:
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
connector
|
|
@ -0,0 +1,6 @@
|
||||||
|
os-brick Changelog history
|
||||||
|
==========================
|
||||||
|
|
||||||
|
1.0.0
|
||||||
|
-----
|
||||||
|
* First version of the library
|
|
@ -37,8 +37,8 @@ source_suffix = '.rst'
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = u'brick'
|
project = u'os-brick'
|
||||||
copyright = u'2013, OpenStack Foundation'
|
copyright = u'2015, OpenStack Foundation'
|
||||||
|
|
||||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||||
add_function_parentheses = True
|
add_function_parentheses = True
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
Brick |release| Documenation
|
os-brick |release| Documenation
|
||||||
============================
|
===============================
|
||||||
|
|
||||||
Overview
|
Overview
|
||||||
--------
|
--------
|
||||||
**Brick** is a Python package containing classes that help
|
**os-brick** is a Python package containing classes that help
|
||||||
with volume discover and creation for local storage.
|
with volume discovery and removal from a host.
|
||||||
|
|
||||||
:doc:`installation`
|
:doc:`installation`
|
||||||
Instructions on how to get the distribution.
|
Instructions on how to get the distribution.
|
||||||
|
@ -18,15 +18,15 @@ with volume discover and creation for local storage.
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
-------
|
-------
|
||||||
see the :doc:`changelog` for a full list of changes to **Brick**.
|
see the :doc:`changelog` for a full list of changes to **os-brick**.
|
||||||
|
|
||||||
About This Documentation
|
About This Documentation
|
||||||
------------------------
|
------------------------
|
||||||
This documentation is generated using the `Sphinx
|
This documentation is generated using the `Sphinx
|
||||||
<http://sphinx.pocoo.org/>`_ documentation generator. The source files
|
<http://sphinx.pocoo.org/>`_ documentation generator. The source files
|
||||||
for the documentation are located in the *doc/* directory of the
|
for the documentation are located in the *doc/* directory of the
|
||||||
**Brick** distribution. To generate the docs locally run the
|
**os-brick** distribution. To generate the docs locally run the
|
||||||
following command from the root directory of the **Brick** source.
|
following command from the root directory of the **os-brick** source.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,15 @@ Installation
|
||||||
|
|
||||||
At the command line::
|
At the command line::
|
||||||
|
|
||||||
$ pip install brick
|
$ pip install os-brick
|
||||||
|
|
||||||
Or, if you have virtualenvwrapper installed::
|
Or, if you have virtualenvwrapper installed::
|
||||||
|
|
||||||
$ mkvirtualenv brick
|
$ mkvirtualenv os-brick
|
||||||
$ pip install brick
|
$ pip install os-brick
|
||||||
|
|
||||||
|
Or, from source::
|
||||||
|
|
||||||
|
$ git clone https://github.com/openstack/os-brick
|
||||||
|
$ cd os-brick
|
||||||
|
$ python setup.py install
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
Tutorial
|
||||||
|
========
|
||||||
|
|
||||||
|
This tutorial is intended as an introduction to working with
|
||||||
|
**os-brick**.
|
||||||
|
|
||||||
|
Prerequisites
|
||||||
|
-------------
|
||||||
|
Before we start, make sure that you have the **os-brick** distribution
|
||||||
|
:doc:`installed <installation>`. In the Python shell, the following
|
||||||
|
should run without raising an exception:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
>>> import os_brick
|
||||||
|
|
||||||
|
Fetch all of the initiator information from the host
|
||||||
|
----------------------------------------------------
|
||||||
|
An example of how to collect the initiator information that is needed
|
||||||
|
to export a volume to this host.
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from os_brick.initiator import connector
|
||||||
|
|
||||||
|
# what helper do you want to use to get root access?
|
||||||
|
root_helper = "sudo"
|
||||||
|
# The ip address of the host you are running on
|
||||||
|
my_ip = "192.168.1.1"
|
||||||
|
# Do you want to support multipath connections?
|
||||||
|
multipath = True
|
||||||
|
# Do you want to enforce that multipath daemon is running?
|
||||||
|
enforce_multipath = False
|
||||||
|
initiator = connector.get_connector_properties(root_helper, my_ip,
|
||||||
|
multipath,
|
||||||
|
enforce_multipath)
|
|
@ -1,7 +0,0 @@
|
||||||
========
|
|
||||||
Usage
|
|
||||||
========
|
|
||||||
|
|
||||||
To use brick in a project::
|
|
||||||
|
|
||||||
import brick
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# 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.
|
||||||
|
"""
|
||||||
|
:mod:`os_brick` -- OpenStack host based volume management
|
||||||
|
=========================================================
|
||||||
|
|
||||||
|
.. autmodule:: os_brick
|
||||||
|
:synopsis: OpenStack host based volume management.
|
||||||
|
.. moduleauthor:: Walter A. Boring IV <walter.boring@hp.com>
|
||||||
|
"""
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Copyright 2015 OpenStack Foundation
|
||||||
|
# All Rights Reserved.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
"""
|
||||||
|
Brick's Initiator module.
|
||||||
|
|
||||||
|
The initator module contains the capabilities for discovering the initiator
|
||||||
|
information as well as discovering and removing volumes from a host.
|
||||||
|
|
||||||
|
"""
|
|
@ -12,6 +12,13 @@
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
""" Brick Connector objects for each supported transport protocol.
|
||||||
|
|
||||||
|
.. module: connector
|
||||||
|
|
||||||
|
The connectors here are responsible for discovering and removing volumes for
|
||||||
|
each of the supported transport protocols.
|
||||||
|
"""
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import os
|
import os
|
||||||
|
|
Loading…
Reference in New Issue