OpenStack Info
Gets information about what is in an OpenStack tenant.
Installation
Prerequisites: - python >= 3.6
The tool can be installed from PyPi:
pip install openstackinfo
Bleeding edge versions can be installed directly from GitHub:
git clone https://github.com/wtsi-hgi/openstack-info.git
cd openstack-tenant-cleaner
python setup.py install
or using pip:
pip install git+https://github.com/wtsi-hgi/openstack-info.git@master#egg=openstackinfo
Usage
CLI
Set environment variables:
export OS_USERNAME=user
export OS_TENANT_NAME=tenant
export OS_AUTH_URL=http://example.com:5000/v2.0/
export OS_PASSWORD=password
Then call:
openstackinfo
The available options can be found with openstackinfo -h:
usage: openstackinfo [-h] [-i {type,id}] [--max-connections MAX_CONNECTIONS]
[--retries RETRIES] [--retry-wait RETRY_WAIT]
[--retry-wait-multiplier RETRY_WAIT_MULTIPLIER]
Openstack tenant information retriever
optional arguments:
-h, --help show this help message and exit
-i {type,id}, --index {type,id}
What the OpenStack information should be index by
--max-connections MAX_CONNECTIONS
Maximum number of simultaneous connections to make to
OpenStack
--retries RETRIES Number of times to retry getting information about a
particular tpye of OpenStack resource
--retry-wait RETRY_WAIT
Initial amount of time (in seconds) to wait after a
failure before a retry
--retry-wait-multiplier RETRY_WAIT_MULTIPLIER
Multiplier that is applied to the wait time after each
failure
Python
from openstackinfo.retriever.models import Credentials
from openstackinfo.retriever.retrievers import ShadeInformationRetriever
from openstackinfo.helpers import get_information, RunConfiguration
from openstackinfo.indexers import InformationIndexerByType
retriever = ShadeInformationRetriever(credentials=Credentials(username, password, auth_url, tenant))
configuration = RunConfiguration(retriever=retriever, indexer=InformationIndexerByType)
openstack_info = get_information(configuration)
Alternatives
shade (underlying library: no CLI, no re-indexing).
Nova CLI (does not return JSON).
Openstack CLI (does not return server metadata).
Release files for openstackinfo 5.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openstackinfo-5.4.0.tar.gz | 10.5 kB | Details |
Release files / openstackinfo-5.4.0.tar.gz
| Download URL | openstackinfo-5.4.0.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f27a314c8486b9e2dfff5deb63a0115ac53ba68729d0f28040efe860d8a7210f
|
|
BLAKE2b-256 checksum How to use checksums |
b891311540f2f603e976dc1659052f7469ec1e2ffe09e3d0789807c0d26d81fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |