Update README
Fix out of date note, add `install the client from PyPI` section and add a full list of subcommands for command line. Change-Id: Ic45bd9c72de2a34abef8dfd3f235933753bdb93e Closes-bug: #1552422
This commit is contained in:
41
README.rst
41
README.rst
@@ -22,10 +22,21 @@ OpenStack.
|
|||||||
.. contents:: Contents:
|
.. contents:: Contents:
|
||||||
:local:
|
:local:
|
||||||
|
|
||||||
Command-line API
|
Install the client from PyPI
|
||||||
----------------
|
----------------------------
|
||||||
|
The :program:`python-searchlightclient` package is published on `PyPI`_ and
|
||||||
|
so can be installed using the pip tool, which will manage installing all
|
||||||
|
python dependencies::
|
||||||
|
|
||||||
To execute CLI commands to standalone searchlight set with keystone.
|
$ pip install python-searchlightclient
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
The packages on PyPI may lag behind the git repo in functionality.
|
||||||
|
|
||||||
|
.. _PyPI: https://pypi.python.org/pypi/python-searchlightclient/
|
||||||
|
|
||||||
|
Setup the client from source
|
||||||
|
----------------------------
|
||||||
|
|
||||||
* Clone repository for python-searchlightclient::
|
* Clone repository for python-searchlightclient::
|
||||||
|
|
||||||
@@ -57,6 +68,11 @@ All further commands in this section should be run with the venv active:
|
|||||||
|
|
||||||
(venv) $ python setup.py develop
|
(venv) $ python setup.py develop
|
||||||
|
|
||||||
|
Command-line API
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Set Keystone environment variables to execute CLI commands against searchlight.
|
||||||
|
|
||||||
* To execute CLI commands::
|
* To execute CLI commands::
|
||||||
|
|
||||||
$ export OS_USERNAME=<user>
|
$ export OS_USERNAME=<user>
|
||||||
@@ -65,12 +81,17 @@ All further commands in this section should be run with the venv active:
|
|||||||
$ export OS_AUTH_URL='http://localhost:5000/v2.0/'
|
$ export OS_AUTH_URL='http://localhost:5000/v2.0/'
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
With devstack you just need to $ source openrc <user> <project>
|
With devstack you just need to $ source openrc <user> <project>. And you can
|
||||||
|
work with a local installation by passing --os-token <TOKEN> and --os-url
|
||||||
|
http://localhost:9393. You can also set up a `Openstackclient`_ config file
|
||||||
|
to work with the CLI.
|
||||||
|
|
||||||
|
.. _Openstackclient: http://docs.openstack.org/developer/python-openstackclient/configuration.html#clouds-yaml
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
$ openstack
|
$ openstack
|
||||||
(openstack) search resource-type list
|
(openstack) search resource type list
|
||||||
+--------------------------+--------------------------+
|
+--------------------------+--------------------------+
|
||||||
| Name | Type |
|
| Name | Type |
|
||||||
+--------------------------+--------------------------+
|
+--------------------------+--------------------------+
|
||||||
@@ -81,6 +102,16 @@ All further commands in this section should be run with the venv active:
|
|||||||
| OS::Nova::Server | OS::Nova::Server |
|
| OS::Nova::Server | OS::Nova::Server |
|
||||||
+--------------------------+--------------------------+
|
+--------------------------+--------------------------+
|
||||||
|
|
||||||
|
Here are the full list of subcommands, Use -h to see options:
|
||||||
|
|
||||||
|
============================= =======================================
|
||||||
|
Subcommand Description
|
||||||
|
============================= =======================================
|
||||||
|
search facet list List Searchlight Facet
|
||||||
|
search resource type list List Searchlight Resource Type (Plugin)
|
||||||
|
search query Search Searchlight resource
|
||||||
|
============================= =======================================
|
||||||
|
|
||||||
Python API
|
Python API
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user