RETIRED, OpenStack Search (Searchlight) Client
Go to file
liyingjun cb790b63af Init searchlightclient base
This patch includes:
1. client base
2. v1 resource type list client

Patial blueprint: openstack-client-search-initial-plugin

Change-Id: Ife57592cdff80cf6fa440dd2daba9daceefd3a11
2015-11-28 16:40:16 +08:00
doc Init searchlightclient base 2015-11-28 16:40:16 +08:00
searchlightclient Init searchlightclient base 2015-11-28 16:40:16 +08:00
tools Init searchlightclient base 2015-11-28 16:40:16 +08:00
.gitignore Init searchlightclient base 2015-11-28 16:40:16 +08:00
.gitreview Added .gitreview 2015-11-19 10:13:03 +00:00
.testr.conf Init searchlightclient base 2015-11-28 16:40:16 +08:00
CONTRIBUTING.rst Init searchlightclient base 2015-11-28 16:40:16 +08:00
LICENSE Init searchlightclient base 2015-11-28 16:40:16 +08:00
MANIFEST.in Init searchlightclient base 2015-11-28 16:40:16 +08:00
README.rst Init searchlightclient base 2015-11-28 16:40:16 +08:00
babel.cfg Init searchlightclient base 2015-11-28 16:40:16 +08:00
openstack-common.conf Init searchlightclient base 2015-11-28 16:40:16 +08:00
requirements.txt Init searchlightclient base 2015-11-28 16:40:16 +08:00
setup.cfg Init searchlightclient base 2015-11-28 16:40:16 +08:00
setup.py Init searchlightclient base 2015-11-28 16:40:16 +08:00
test-requirements.txt Init searchlightclient base 2015-11-28 16:40:16 +08:00
tox.ini Init searchlightclient base 2015-11-28 16:40:16 +08:00

README.rst

python-searchlightclient

OpenStack Indexing and Search API Client Library

This is a client library for Searchlight built on the Searchlight API. It provides a Python API (the searchlightclient module) and a command-line tool (searchlight).

The project is hosted on Launchpad, where bugs can be filed. The code is hosted on Github. Patches must be submitted using Gerrit, not Github pull requests.

python-searchlightclient is licensed under the Apache License like the rest of OpenStack.

Contents:

Command-line API

Python API

To use with keystone as the authentication system:

>>> from keystoneclient.auth.identity import generic
>>> from keystoneclient import session
>>> from searchlightclient import client
>>> auth = generic.Password(auth_url=OS_AUTH_URL, username=OS_USERNAME, password=OS_PASSWORD, tenant_name=OS_TENANT_NAME)
>>> sc = client.Client('1', session=auth)
>>> sc.resource_types.list()
[...]

Testing

There are multiple test targets that can be run to validate the code.

  • tox -e pep8 - style guidelines enforcement
  • tox -e py27 - traditional unit testing