Go to file
Gorka Eguileor 385e6f4a1e Add support for IBM SVC
When initializing IBM SVC with the memory persistence we get an exception:

  return IMPL.volume_get_all_by_host(context, host, filters=filters)
  AttributeError: 'DB' object has no attribute 'volume_get_all_by_host'

The issue is caused by the SVC driver accessing the database directly,
which is not considered good practice in Cinder nowadays.

The problem with drivers using the DB directly is that cinderlib doesn't
require a DB, it can work storing everything in memory. To facilitate
storage of the resources' metadata cinderlib has its own persistence
plugin mechanism, and has some ad-hoc "workarounds" in the DB class for
drivers that access the DB directly.

The IBM driver has the following DB dependencies:

- volume_get_all_by_host when using objects.VolumeList.get_all_by_host

- volume_type_get when using objects.VolumeType.get_by_name_or_id

- volume_type_get_by_name when using
  objects.VolumeType.get_by_name_or_id

- volume_get directly called by get_by_id when using
  objects.Volume.get_by_id

- _group_type_get_full directly called by get_by_id when using
  objects.GroupType.get_by_id

- volume_admin_metadata_get direct call

- volume_admin_metadata_update direct call

- volume_admin_metadata_delete direct call

In cinderlib we don't currently support groups or consistency groups, so
we don't need to implement `_group_type_get_full` and we have already
implemented workaround for methods `volume_get` and `volume_type_get`,
so this patch implements the remaining 5 methods volume_get_all_by_host,
volume_type_get_by_name, volume_admin_metadata_get,
volume_admin_metadata_update, and volume_admin_metadata_delete in the DB
class.

Closes-Bug: #1821898
Change-Id: I94b4864c5823976f4a9cac2e40943b74aca4066e
2019-07-31 21:13:19 +02:00
2019-07-31 21:13:19 +02:00
2019-04-26 16:28:35 +00:00
2019-04-26 16:28:35 +00:00
2019-02-26 16:21:34 +01:00
2019-03-20 18:34:16 +01:00
2019-02-26 16:21:34 +01:00
2019-04-26 16:28:35 +00:00
2019-02-26 16:21:34 +01:00
2019-07-08 12:09:19 -04:00
2019-04-26 16:28:35 +00:00
2019-03-15 13:19:12 +01:00
2019-03-15 13:19:12 +01:00
2019-07-08 12:09:19 -04:00
2019-07-08 12:09:19 -04:00

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

Description
DEPRECATED, Direct usage of Cinder Block Storage drivers without the services
Readme 3 MiB