Commit Graph

19 Commits (master)

Author SHA1 Message Date
Thomas Goirand 2e89c931a6 Stop invoking Python 2
There's some remainings of Python 2 in a few .py that this patch
intends to fix. This patch has been in Debian for the last 2
years, it's probably about time to get this in upstream Cinder too.

Change-Id: I9c08c3ff1177c323a1c8cfd234ad58bd607e3c1a
2020-04-24 09:23:52 +02:00
Walter A. Boring IV fb3b843b66 Add get_driver_options method
This patch adds a new static method to drivers to expose their
configuration options.  This also adds the same call to backup drivers
as well as the zone manager drivers.
Updated the generate_driver_list to expose the options as well.

This patch also orders the driver list alphabetically to make it easier
and consistent to find drivers.   The driver list is now broken down
into supported and unsupported drivers as well.

Change-Id: I3e7db26ef3df24a12e3bfa219fe25bfb315335ec
2019-03-07 09:18:01 -05:00
Sean McGinnis 113b383196 Clean output of driver list generation
The driver list generation takes driver docstrings and attempts
to parse that into rst formatted output for publication. With the
way this content is formatted within the docstring, this would
cause some slightly off formatting in the html output.

This attempts to better extract that information to make the
output cleaner and more readable.

Change-Id: I3b7e0817ade1c86b6d157c96872f00bb1b99c3d8
2018-04-25 17:15:23 -05:00
junboli db4327b6fe Keep consistent of naming convention
In the project, some of the terminology, like URL, URLs, API, APIs, OpenStack,
UUID, Cinder are neglectfully written as url, api, openstack, uuid, cinder.
This patch is to keep consistent of naming convention.

Change-Id: I98777fb4748cbc58b6e2fd1aca058d3e44069d07
2017-07-10 10:46:44 +08:00
Jenkins a58cb0c693 Merge "Add driver supported status to dict output format" 2017-03-27 20:58:49 +00:00
Walter A. Boring IV 76304ef091 Output the driver info as json
This patch fixes the output of the dict format to json, so it can be
consumed a bit easier.

Change-Id: I7574c6eefddb8f085422387f9d4892b8dbe9977d
2017-02-10 21:24:10 +00:00
Vipin Balachandran d34cd5cbac Add driver supported status to dict output format
Adding driver 'supported' status to the 'dict' output format
of driver listing.

Change-Id: I5ac1b151bd561991f12e4697b73fbbc3b8e5999b
2017-01-24 16:48:14 +05:30
Sean McGinnis d1166474ab Prevent driver load failures from objects
There's been an intermittent issue where getting a list of all
drivers would fail to get all defined classes. With recent local
tests, once it got 103 drivers, but several times it got 69

This appears to be from exceptions thrown while loading the
decorated classes with various cinder.objects classes not being
defined. To get around this, this adds an explicit load of all
cinder.objects before attempting to get the driver classes.

Change-Id: Ief4a93ec2d8256424166c7bf3b9d48a79a6e5e54
2017-01-16 17:26:54 -06:00
Sean McGinnis cf6744db62 Skip CI link in list for infra supported drivers
For lack of a better way, for drivers that have CI run by Jenkins we
denote this using the name 'Cinder_Jenkins'. CI links were added to
the generated driver list, but for these drivers this results in a
link to an invalid wiki page. For these drivers we should just skip
adding the CI info link.

Change-Id: I8a3087f8102392ca604a42fdf006e1a4e1a026d6
2017-01-06 13:52:38 -06:00
Vipin Balachandran 2a247e89e5 Add unsupported status to driver listing
Appending "unsupported" to the driver name in the driver listing
for unsupported drivers. The instance variable "_supported" in
BaseVD is changed to class variable "SUPPORTED" so that the supported
status of drivers can be read after loading the driver modules.

Change-Id: I21ca9137a847873f2ec026520daf8b97603d1888
2016-11-29 18:04:22 +05:30
Cady_Chen aaa51695da Fix "wrap functions with 2 blank lines" pep8 check
Now gates are requires this pep8 rule as mandatory so until it'll be
fixed merge is blocked

Change-Id: Ic34859a0397a770db0a5203491f035cb81461bce
2016-11-17 02:50:35 +00:00
Vipin Balachandran 2a8d7f858c Add CI wiki page to driver listing
The 'dict' output format prints the CI wiki name, but it is
missing in the 'str' output format. Adding CI wiki page to
the 'str' output format.

Change-Id: Ib62864221702d18a4f49118180b9af65f069ec4a
2016-08-12 13:12:11 +05:30
Walter A. Boring IV 1a5de5d4bd CI: Add CI_WIKI_NAME to all drivers
This patch adds a CI_WIKI_NAME to each driver object.  The value is the exact
name of the ThirdPartySystems wiki page.   This allows us to create an
automated tool to associated jobs to drivers and track their CI reporting
status correctly.

This patch also updates the script to output the
driver list as a python list of dicts that can be directly consumed.

Change-Id: I0ec5f705e91f680a731648cf50738ea219565f70
2016-08-09 08:24:00 -07:00
Walter A. Boring IV c28cd113be Don't puke when exiting driver list
When you run the file from inside the
tools dir, it pukes out an AttributeError for NoneType object
has no attribute 'close'.  This patch makes sure that exiting
doesn't cause a puke.

Change-Id: Ib6c4f451096cd07d0423941cab52ffa8cd8dc471
2016-08-02 07:03:33 -07:00
Sean McGinnis 8148038e92 Add driver list to doc build
We have tox -e gendriverlist that outputs an RST-ish report of all drivers
in the tree. This output can be used in the docs build to automatically
publish the list of drivers to make it easier to find officially supported

This effectively removes the existing drivers.html that was generated prior
that did not actually contain any useful information.

Change-Id: I8de78723af76aabcc976733ac4b248db0b8ca16f
2016-07-26 11:09:05 -05:00
Sean McGinnis 3c18c6f440 Add interface documentation to driver devref
Link the docstring generated documentation for the driver interfaces into
the drivers devref page for easy access to driver method documentation.

Change-Id: Ie22599fef99ebfac12f3b9bb251ae5bdfff4bff6
2016-07-24 17:23:29 -05:00
Vipin Balachandran 71cf291cf2 Remove generate_driver_list dependency on cur dir
tools/ assumes that the current directory is
the Cinder root directory. If the script is run from a different
directory, it doesn't generate the driver info. This patch changes
the current directory to the root directory before calling the
utility functions to generate the driver list.

Closes-bug: #1604269
Change-Id: I35829003868531ccd76ee26e83e0b51067984a6a
2016-07-19 13:10:37 +05:30
Sean McGinnis e7b40242f8 Add driver interface checks
This is the start of an effort to both validate that drivers fully
implement the expected minimum requirements as well as to create a clear
place for driver developers to learn what needs to be implemented and get
documentation explaining what is expected for each method.

This also enables us to create tooling for documenting the available
drivers and their capabilities, to some degree. A follow up patch will
show some of what I'm thinking there, but it will make it possible to write
scripts for different needs.

This is somewhat a cleanup attempt to the ABC work that was started a
while back. This does not aim to replace that effort, but give a
mechanism for some of the things expected out of that effort that ended
up not being possible with how it evolved.

In most cases we do not really care if a driver is inherited from a
certain base class, just that it conforms to the given interface.

The interface/inheritance work really centers around two separate

 * Ensuring drivers conform to an expected interface
 * Allowing code reuse and common implementation

This is really for the first item. Additional work is needed to complete
the ABC work we've done, but that really focuses on the second item, and
is out of scope for the intent of this patch.

Change-Id: I4168225126fe88c31712d94f0a130e9e7ede3446
2016-06-13 15:21:47 +00:00
Anton Arefiev a7f264f3af Add drivers list generator
It is useful to have a maintained (in source control) list
of drivers that exist in Cinder. It could be used in docs
and unit tests to check method impl on backend drivers.

This change add tool for generate list of drivers based on
existing BaseVD class in class hierarchy of volume drivers.

Output example:
Drivers: ['cinder.volume.drivers.lvm.LVMVolumeDriver',

Implements: blueprint drivers-list-generator
Change-Id: I0e10906873e659e09a6e34531a0c932495d7c399
2015-07-21 18:04:29 +03:00