DEPRECATED, Direct usage of Cinder Block Storage drivers without the services
Go to file
Gorka Eguileor fbd7a72c1b Fix configuration options
When fixing bug #1854188 (Change-ID:
I62e992804a3ae6aa0b4aa4f883807783197d4b33) we broke configuration
options, because now we cannot pass configuration options from the
DEFAULT section, and some ListOpt don't work because cinderlib was
incorrectly expecting all these options to have bounds=True, but some
don't define it and default to False.

Most of the "crazy" code we currently have around oslo config is because
we wanted to support drivers that add configuration options on runtime
and reload the configuration.

This made sense when cinderlib was not an OpenStack official project,
but now that it is it makes more sense to force Cinder drivers to do the
right thing.

Aligned with this, this patch removes all the faking of the cinder.conf
file as a StringIO object, and simply sets things in the configuration
object that is passed to the drivers, which is the only thing they
should be using.

This will make cinderlib code more robust, even if some drivers will now
need to be modified to work with cinderlib.

We are validating known configuration options and ignoring unknown ones,
like Cinder does.

The NetApp driver was one of the drivers that would get broken, but
since I have access to it and we can make a very small and targeted
workaround to avoid breaking it, we do it as well.

Closes-Bug: #1856556
Change-Id: I67fbf8e9d7ee79f3d6617b4d0ae755dae0e1987a
2019-12-19 11:05:22 +01:00
cinderlib Fix configuration options 2019-12-19 11:05:22 +01:00
devstack OpenDev Migration Patch 2019-04-26 16:28:35 +00:00
doc Fix configuration options 2019-12-19 11:05:22 +01:00
playbooks Merge "Fake unused packages" 2019-10-24 13:46:07 +00:00
releasenotes Merge "Add missing release notes" 2019-12-10 17:42:43 +00:00
roles/run-cinderlib-tests Support passing pool to functional tests 2019-12-04 19:39:53 +01:00
tools Add DevStack plugin 2019-03-20 18:34:16 +01:00
.gitignore Add zuul jobs 2019-02-26 16:21:34 +01:00
.gitreview OpenDev Migration Patch 2019-04-26 16:28:35 +00:00
.stestr.conf Add zuul jobs 2019-02-26 16:21:34 +01:00
.zuul.yaml Merge "Fake unused packages" 2019-10-24 13:46:07 +00:00
CONTRIBUTING.rst OpenDev Migration Patch 2019-04-26 16:28:35 +00:00
DESCRIPTION.rst Fix cinderlib Python package 2019-03-15 13:19:12 +01:00
HACKING.rst Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
LICENSE Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
README.rst Fix cinderlib Python package 2019-03-15 13:19:12 +01:00
babel.cfg Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
bindep.txt Add pdf build support 2019-09-04 13:34:47 +00:00
lower-constraints.txt Bump openstackdocstheme to 1.20.0 2019-07-16 16:57:55 +08:00
requirements.txt Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
setup.cfg Add Python 3 Train unit tests 2019-07-08 12:09:19 -04:00
setup.py Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
test-requirements.txt Fix cinderlib Python package 2019-03-15 13:19:12 +01:00
tox.ini Support passing pool to functional tests 2019-12-04 19:39:53 +01:00

README.rst

Cinder Library

image

image

image

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.

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