![]() Cinderlib is designed to only have 1 persitent plugin loaded through the whole life of the application, so our unit tests have to work around this by cleaning things up manually, which they are not doing correctly. Current code runs fine because test_dbms.py goes before test_memory.py, but if we rename the test_memory.py to test_a.py then we'll start seing "IndexError: list index out of range" errors. There are 2 issues with the current code: - We are not cleaning up properly after the memory persistence test because we are changing instance attributes instead of the class attributes. We resolve this calling the clear method instead. - We are not taking into account that the memory persistency plugin changes some of the OVO methods, so we need to restore them after the tests. Change-Id: I29847f7a8de49625882145c3eff7983ff8d01265 |
||
---|---|---|
cinderlib | ||
devstack | ||
doc | ||
playbooks | ||
releasenotes | ||
tools | ||
.gitignore | ||
.gitreview | ||
.stestr.conf | ||
.zuul.yaml | ||
CONTRIBUTING.rst | ||
DESCRIPTION.rst | ||
HACKING.rst | ||
LICENSE | ||
README.rst | ||
babel.cfg | ||
lower-constraints.txt | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
README.rst
Cinder Library
Introduction
The Cinder Library, also known as cinderlib, is a Python library that leverages the Cinder project to provide an object oriented abstraction around Cinder's storage drivers to allow their usage directly without running any of the Cinder services or surrounding services, such as KeyStone, MySQL or RabbitMQ.
- Free software: Apache Software License 2.0
- Documentation: https://docs.openstack.org/cinderlib/latest/
The library is intended for developers who only need the basic CRUD functionality of the drivers and don't care for all the additional features Cinder provides such as quotas, replication, multi-tenancy, migrations, retyping, scheduling, backups, authorization, authentication, REST API, etc.
The library was originally created as an external project, so it didn't have the broad range of backend testing Cinder does, and only a limited number of drivers were validated at the time. Drivers should work out of the box, and we'll keep a list of drivers that have added the cinderlib functional tests to the driver gates confirming they work and ensuring they will keep working.
Features
- Use a Cinder driver without running a DBMS, Message broker, or Cinder service.
- Using multiple simultaneous drivers on the same application.
- Basic operations support:
- Create volume
- Delete volume
- Extend volume
- Clone volume
- Create snapshot
- Delete snapshot
- Create volume from snapshot
- Connect volume
- Disconnect volume
- Local attach
- Local detach
- Validate connector
- Extra Specs for specific backend functionality.
- Backend QoS
- Multi-pool support
- Metadata persistence plugins:
- Stateless: Caller stores JSON serialization.
- Database: Metadata is stored in a database: MySQL, PostgreSQL, SQLite...
- Custom plugin: Caller provides module to store Metadata and cinderlib calls it when necessary.
Demo
![](https://asciinema.org/a/TcTR7Lu7jI0pEsd9ThEn01l7n.png)