From 6eb503420266a7497b7b13b4c435552370fe1708 Mon Sep 17 00:00:00 2001 From: "Walter A. Boring IV" Date: Thu, 13 Jun 2019 21:08:27 +0000 Subject: [PATCH] Update some documentation --- AUTHORS.rst | 13 ------------- ChangeLog | 3 +++ README.rst | 33 ++++++++++++++++++++++++++++++--- doc/source/authors.rst | 1 - doc/source/conf.py | 1 + doc/source/index.rst | 1 - doc/source/usage.rst | 34 +++++++++++++++++++++++++++++++++- setup.cfg | 4 ++++ 8 files changed, 71 insertions(+), 19 deletions(-) delete mode 100644 AUTHORS.rst delete mode 100644 doc/source/authors.rst diff --git a/AUTHORS.rst b/AUTHORS.rst deleted file mode 100644 index efb17e4..0000000 --- a/AUTHORS.rst +++ /dev/null @@ -1,13 +0,0 @@ -======= -Credits -======= - -Development Lead ----------------- - -* Walter A. Boring IV - -Contributors ------------- - -None yet. Why not be the first? diff --git a/ChangeLog b/ChangeLog index 543cff3..6cd3411 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ CHANGES ======= +* remove manifest +* Fix pep8 +* renamed rbd\_iscsi\_client to client * Added basic unit tests * Initial commit diff --git a/README.rst b/README.rst index cc6ee95..cf798c5 100644 --- a/README.rst +++ b/README.rst @@ -13,28 +13,55 @@ RBD iSCSI Client :target: https://rbd-iscsi-client.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status - .. image:: https://pyup.io/repos/github/hemna/rbd_iscsi_client/shield.svg :target: https://pyup.io/repos/github/hemna/rbd_iscsi_client/ :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 * 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 -------- -* 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 ------- +.. _ceph-iscsi: https://github.com/ceph/ceph-iscsi + This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template. .. _Cookiecutter: https://github.com/audreyr/cookiecutter diff --git a/doc/source/authors.rst b/doc/source/authors.rst deleted file mode 100644 index 7739272..0000000 --- a/doc/source/authors.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../../AUTHORS.rst diff --git a/doc/source/conf.py b/doc/source/conf.py index 5ccf637..639c9db 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -40,6 +40,7 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'reno.sphinxext', + 'pbr.sphinxext', 'openstackdocstheme'] # Add any paths that contain templates here, relative to this directory. diff --git a/doc/source/index.rst b/doc/source/index.rst index 0a206d8..77274b8 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -9,7 +9,6 @@ Welcome to RBD iSCSI Client's documentation! installation usage contributing - authors history Indices and tables diff --git a/doc/source/usage.rst b/doc/source/usage.rst index d67923b..9a2c398 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -4,4 +4,36 @@ Usage 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) diff --git a/setup.cfg b/setup.cfg index d337fd2..7301572 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,6 +40,10 @@ warning-is-error = 1 source-dir = doc/source build-dir = doc/build all_files = 1 +builders = html + +[pbr] +skip_authors = 1 [upload_sphinx] upload-dir = doc/build/html