Update some documentation
This commit is contained in:
parent
50dae063a3
commit
6eb5034202
13
AUTHORS.rst
13
AUTHORS.rst
@ -1,13 +0,0 @@
|
|||||||
=======
|
|
||||||
Credits
|
|
||||||
=======
|
|
||||||
|
|
||||||
Development Lead
|
|
||||||
----------------
|
|
||||||
|
|
||||||
* Walter A. Boring IV <waboring@hemna.com>
|
|
||||||
|
|
||||||
Contributors
|
|
||||||
------------
|
|
||||||
|
|
||||||
None yet. Why not be the first?
|
|
@ -1,5 +1,8 @@
|
|||||||
CHANGES
|
CHANGES
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
* remove manifest
|
||||||
|
* Fix pep8
|
||||||
|
* renamed rbd\_iscsi\_client to client
|
||||||
* Added basic unit tests
|
* Added basic unit tests
|
||||||
* Initial commit
|
* Initial commit
|
||||||
|
33
README.rst
33
README.rst
@ -13,28 +13,55 @@ RBD iSCSI Client
|
|||||||
:target: https://rbd-iscsi-client.readthedocs.io/en/latest/?badge=latest
|
:target: https://rbd-iscsi-client.readthedocs.io/en/latest/?badge=latest
|
||||||
:alt: Documentation Status
|
:alt: Documentation Status
|
||||||
|
|
||||||
|
|
||||||
.. image:: https://pyup.io/repos/github/hemna/rbd_iscsi_client/shield.svg
|
.. image:: https://pyup.io/repos/github/hemna/rbd_iscsi_client/shield.svg
|
||||||
:target: https://pyup.io/repos/github/hemna/rbd_iscsi_client/
|
:target: https://pyup.io/repos/github/hemna/rbd_iscsi_client/
|
||||||
:alt: Updates
|
:alt: Updates
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
REST client to talk to rbd-target-api
|
This is a REST client that talks to ceph-iscsi's rbd-target-api to export
|
||||||
|
rbd images/volumes to an iSCSI initiator.
|
||||||
|
|
||||||
|
|
||||||
* Free software: Apache Software License 2.0
|
* Free software: Apache Software License 2.0
|
||||||
* Documentation: https://rbd-iscsi-client.readthedocs.io.
|
* Documentation: https://rbd-iscsi-client.readthedocs.io.
|
||||||
|
|
||||||
|
|
||||||
|
Overview
|
||||||
|
--------
|
||||||
|
This python package is a client that talks to the ceph-iscsi rbd-target-api.
|
||||||
|
rbd-target-api coordinates the rbd volume exports via iSCSI
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* TODO
|
This is a REST client that talks to ceph-iscsi's rbd-target-api to export
|
||||||
|
rbd images/volumes to an iSCSI initiator.
|
||||||
|
|
||||||
|
* get_api - Get all the api endpoints
|
||||||
|
* get_config - get the entire gateway config
|
||||||
|
* get_targets - Get all of the target_iqn's defined in the gateways
|
||||||
|
* create_target_iqn - create a new target_iqn
|
||||||
|
* delete_target_iqn - delete a target_iqn
|
||||||
|
* get_clients - get the clients (initiators) defined in the gateways
|
||||||
|
* get_client_info - get the client information
|
||||||
|
* create_client - Register a new client (initiator) with the gateways
|
||||||
|
* delete_client - unregister a client (initiator) from the gateways
|
||||||
|
* set_client_auth - set CHAP credentials for the client (initiator)
|
||||||
|
* get_disks - get list of volumes defined to the gateways
|
||||||
|
* create_disk - create a new volume/disk that the gateways can export
|
||||||
|
* find_disk - Find a disk that the gateway knows about
|
||||||
|
* delete_disk - delete a disk from the gateway and pool
|
||||||
|
* register_disk - Make the disk available to export to a client.
|
||||||
|
* unregister_disk - Make a disk unavailable to export to a client.
|
||||||
|
* export_disk - Export a registered disk to a client (initiator)
|
||||||
|
* unexport_disk - unexport a disk from a client (initiator)
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
.. _ceph-iscsi: https://github.com/ceph/ceph-iscsi
|
||||||
|
|
||||||
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
|
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
|
||||||
|
|
||||||
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
|
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
|
||||||
|
@ -1 +0,0 @@
|
|||||||
.. include:: ../../AUTHORS.rst
|
|
@ -40,6 +40,7 @@
|
|||||||
extensions = ['sphinx.ext.autodoc',
|
extensions = ['sphinx.ext.autodoc',
|
||||||
'sphinx.ext.viewcode',
|
'sphinx.ext.viewcode',
|
||||||
'reno.sphinxext',
|
'reno.sphinxext',
|
||||||
|
'pbr.sphinxext',
|
||||||
'openstackdocstheme']
|
'openstackdocstheme']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
@ -9,7 +9,6 @@ Welcome to RBD iSCSI Client's documentation!
|
|||||||
installation
|
installation
|
||||||
usage
|
usage
|
||||||
contributing
|
contributing
|
||||||
authors
|
|
||||||
history
|
history
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
|
@ -4,4 +4,36 @@ Usage
|
|||||||
|
|
||||||
To use RBD iSCSI Client in a project::
|
To use RBD iSCSI Client in a project::
|
||||||
|
|
||||||
import rbd_iscsi_client
|
from rbd_iscsi_client import client
|
||||||
|
|
||||||
|
test = client.RBDISCSIClient('username', 'password',
|
||||||
|
'http://10.0.0.69:5000')
|
||||||
|
|
||||||
|
response, content = test.get_api()
|
||||||
|
|
||||||
|
# print out the API endpoints
|
||||||
|
print(content)
|
||||||
|
|
||||||
|
# register an initiator/client with the gateway
|
||||||
|
# fill this with /etc/iscsi/inititorname.iscsi
|
||||||
|
initiator_iqn = 'iqn.1996-04.de.suse:01:e55123456789'
|
||||||
|
|
||||||
|
# Get the target_iqn from the gateway to populate this
|
||||||
|
resp, body = test.get_targets()
|
||||||
|
if 'targets' in body:
|
||||||
|
target_iqn = body['targets'][0]
|
||||||
|
|
||||||
|
test.create_client(target_iqn, initiator_iqn)
|
||||||
|
|
||||||
|
# create chap creds
|
||||||
|
test.set_client_auth(target_iqn, initiator_iqn,
|
||||||
|
username, password)
|
||||||
|
|
||||||
|
# create disk
|
||||||
|
test.create_disk(pool, volume_name)
|
||||||
|
lun_name = "%s/%s" % (pool, volume_name)
|
||||||
|
test.register_disk(target_iqn, lun_name)
|
||||||
|
|
||||||
|
#now export the disk to the initiator
|
||||||
|
test.export_disk(target_iqn, initiator_name,
|
||||||
|
pool, volume_name)
|
||||||
|
@ -40,6 +40,10 @@ warning-is-error = 1
|
|||||||
source-dir = doc/source
|
source-dir = doc/source
|
||||||
build-dir = doc/build
|
build-dir = doc/build
|
||||||
all_files = 1
|
all_files = 1
|
||||||
|
builders = html
|
||||||
|
|
||||||
|
[pbr]
|
||||||
|
skip_authors = 1
|
||||||
|
|
||||||
[upload_sphinx]
|
[upload_sphinx]
|
||||||
upload-dir = doc/build/html
|
upload-dir = doc/build/html
|
||||||
|
Loading…
Reference in New Issue
Block a user