Go to file
Gorka Eguileor 81c66bc101 Fix loading object without configured backend
On commit fe9922d21c we added the
possibility of loading objects without configured backend, but there
were still some cases were loading could fail like this:

Traceback (most recent call last):
  File "/csi/cinderlib_csi/cinderlib_csi.py", line 127, in dolog
    result = f(self, request, context)
  File "/csi/cinderlib_csi/cinderlib_csi.py", line 168, in checker
    return f(self, request, context)
  File "/csi/cinderlib_csi/cinderlib_csi.py", line 210, in wrapper
    return func(self, request, context)
  File "/csi/cinderlib_csi/cinderlib_csi.py", line 839, in NodeStageVolume
    vol = self._get_vol(request.volume_id)
  File "/csi/cinderlib_csi/cinderlib_csi.py", line 360, in _get_vol
    volume_id=volume_id, backend_name=backend_name, **filters)
  File "/csi/cinderlib_csi/cl_crd.py", line 378, in get_volumes
    backend_name=backend_name)
  File "/csi/cinderlib_csi/cl_crd.py", line 169, in get
    resource = cinderlib.load(resource_json)
  File "/cinderlib/cinderlib/serialization.py", line 160, in load
    return getattr(objects, json_src['class']).load(json_src, save)
  File "/cinderlib/cinderlib/objects.py", line 195, in load
    backend = cls.backend_class.load_backend(json_src['backend'])
  File "/cinderlib/cinderlib/cinderlib.py", line 261, in load_backend
    raise Exception('Backend not present in system or json.')
Exception: Backend not present in system or json.

This patch fixes this issue by checking the `fail_on_missing_backend`
configuration option when loading using the base object class.

Also fixes saving of an object that has been loaded without the backend
configured in the system.
2018-07-23 18:29:04 +02:00
2018-07-04 12:51:17 +02:00
2018-07-02 19:09:58 +02:00
2017-11-03 16:45:13 +01:00
2018-07-12 16:16:26 +03:00
2017-11-03 16:45:13 +01:00
2018-06-14 20:47:24 +02:00
2017-11-03 16:45:13 +01:00
2018-07-04 12:51:22 +02:00
2018-07-18 12:20:55 +02:00
2018-06-14 20:28:09 +02:00
2018-07-04 20:18:45 +02:00
2018-07-04 20:18:45 +02:00
2018-06-12 18:45:30 +02:00
2018-06-13 12:46:13 +02:00

# Cinder library

Cinder Library is a Python library that allows using storage drivers outside of
Cinder.

* Free software: Apache Software License 2.0
* Full Documentation: [https://cinderlib.readthedocs.io](https://cinderlib.readthedocs.io).

This library is currently in Alpha stage and is primarily intended as a proof
of concept at this stage.  While some drivers have been manually validated most
drivers have not, so there's a good chance that they could experience issues.

When using this library one should be aware that this is in no way close to the
robustness or feature richness that the Cinder project provides, for detailed
information on the current limitations please refer to the documentation.

Due to the limited access to Cinder backends and time constraints the list of
drivers that have been manually tested are (I'll try to test more):

- LVM with LIO
- Dell EMC XtremIO
- Dell EMC VMAX
- Kaminario K2
- Ceph/RBD
- NetApp SolidFire

If you try the library with another storage array I would appreciate a note on
the library version, Cinder release, and results of your testing.

## Features

* Use a Cinder driver without running a DBMS, Message broker, or Cinder
  service.
* Using multiple simultaneous drivers on the same program.
* 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
Description
DEPRECATED, Direct usage of Cinder Block Storage drivers without the services
Readme 3 MiB