Skip to content

A Python Package to better search for Openstack Resources.

License

Notifications You must be signed in to change notification settings

stfc/openstack-query-library

Folders and files

NameName
Last commit message
Last commit date
Feb 13, 2025
Feb 28, 2025
Mar 20, 2025
Mar 18, 2025
Dec 5, 2024
Nov 29, 2024
Nov 29, 2024
Nov 29, 2024
Jan 6, 2025
Nov 29, 2024
Dec 10, 2024
Mar 20, 2025

Repository files navigation

Quick Links

User-related Docs:

Feature References

Developer-related Docs:

Openstack Query Library

A Python Package to query for Openstack Resources.

Built on top of the openstacksdk to allow for more complex queries.

Our overall goal is to provide a better, easier-to-use interface to run openstack queries The query library will act as a wrapper around the openstacksdk for running queries.

We aim to provide both a python package and a CLI version.

It will address the following issues:

1. Improved Error Handling

  • The library api will fail-fast and fail-noisily.
  • provides clear error messages if the query is invalid.
  • mitigate problems with mistyped names/filter options - common with the openstacksdk.

2. Improved Reusability

  • common query workflows will be integrated into the query
  • e.g. finding user names/emails for a server

3. Extend Query Capabilities

  • implement query logic missing from openstacksdk. e.g. search by date time
  • chain queries together
    • e.g. find servers that are shutoff AND errored THEN find users belonging to them

4. Improved Grouping/Sorting Functionality

  • allows sorting by multiple keys
  • group the results together in different ways
  • output only specific properties you want
  • write to files, or to different output formats

5. Easy to use syntax

  • sql-like syntax makes it easy to use

Installation

Download and install the project

To install it, follow these instructions

neo@matrix ~ $ git clone https://github.com/stfc/openstack-query-library.git
neo@matrix ~ $ cd openstack-query-library
neo@matrix ~ $ python3 -m pip install .

To verify the installation was done successfully:

neo@matrix ~ $ python3 -m pip list | grep openstackquery
openstackquery           0.1.4

Get credentials

In order to use the library, you will need your Cloud credentials on your computer. Documentation can be found here