From 159a9c0cc5ef4b6bab0058ba12449868bd994a2d Mon Sep 17 00:00:00 2001 From: Peter Penchev Date: Mon, 2 Sep 2019 23:14:45 +0300 Subject: [PATCH] Advertise some of the StorPool driver's capabilities. Change-Id: I347663e72c26cb8ac3fed05221f3fdf9ffa959ef --- cinder/tests/unit/volume/drivers/test_storpool.py | 8 +++++++- cinder/volume/drivers/storpool.py | 9 ++++++--- doc/source/reference/support-matrix.ini | 4 ++-- .../notes/storpool-multiattach-f9b7edccd4db7e02.yaml | 5 +++++ 4 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/storpool-multiattach-f9b7edccd4db7e02.yaml diff --git a/cinder/tests/unit/volume/drivers/test_storpool.py b/cinder/tests/unit/volume/drivers/test_storpool.py index 82aec65b5bd..a0797c3d157 100644 --- a/cinder/tests/unit/volume/drivers/test_storpool.py +++ b/cinder/tests/unit/volume/drivers/test_storpool.py @@ -1,4 +1,4 @@ -# Copyright 2014 - 2017 StorPool +# Copyright 2014 - 2017, 2019 StorPool # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -242,6 +242,12 @@ class StorPoolTestCase(test.TestCase): for pool in stats['pools']: self.assertEqual(21, pool['total_capacity_gb']) self.assertEqual(5, int(pool['free_capacity_gb'])) + + self.assertTrue(pool['multiattach']) + self.assertFalse(pool['QoS_support']) + self.assertFalse(pool['thick_provisioning_support']) + self.assertTrue(pool['thin_provisioning_support']) + if pool['pool_name'] != 'default': m = r.match(pool['pool_name']) self.assertIsNotNone(m) diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py index 4aaf09de269..1792ce2e785 100644 --- a/cinder/volume/drivers/storpool.py +++ b/cinder/volume/drivers/storpool.py @@ -1,4 +1,4 @@ -# Copyright (c) 2014 - 2017 StorPool +# Copyright (c) 2014 - 2019 StorPool # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -90,10 +90,10 @@ class StorPoolDriver(driver.VolumeDriver): fix the docstring formatting 1.2.2 - Reintroduce the driver into OpenStack Queens, add ignore_errors to the internal _detach_volume() method - + 1.2.3 - Advertise some more driver capabilities. """ - VERSION = '1.2.1' + VERSION = '1.2.3' CI_WIKI_NAME = 'StorPool_CI' # TODO(jsbryant) Remove driver in the 'U' release if CI is not fixed. @@ -297,7 +297,10 @@ class StorPoolDriver(driver.VolumeDriver): 'total_capacity_gb': total / units.Gi, 'free_capacity_gb': free / units.Gi, 'reserved_percentage': 0, + 'multiattach': True, 'QoS_support': False, + 'thick_provisioning_support': False, + 'thin_provisioning_support': True, } pools = [dict(space, pool_name='default')] diff --git a/doc/source/reference/support-matrix.ini b/doc/source/reference/support-matrix.ini index ecf2ed3896c..05500629c0c 100644 --- a/doc/source/reference/support-matrix.ini +++ b/doc/source/reference/support-matrix.ini @@ -662,7 +662,7 @@ driver.quobyte=missing driver.rbd=complete driver.seagate=missing driver.sheepdog=missing -driver.storpool=missing +driver.storpool=complete driver.synology=missing driver.vrtsaccess=missing driver.vrtscnfs=missing @@ -800,7 +800,7 @@ driver.quobyte=missing driver.rbd=complete driver.seagate=complete driver.sheepdog=missing -driver.storpool=missing +driver.storpool=complete driver.synology=missing driver.vrtsaccess=missing driver.vrtscnfs=missing diff --git a/releasenotes/notes/storpool-multiattach-f9b7edccd4db7e02.yaml b/releasenotes/notes/storpool-multiattach-f9b7edccd4db7e02.yaml new file mode 100644 index 00000000000..af2f3494c6d --- /dev/null +++ b/releasenotes/notes/storpool-multiattach-f9b7edccd4db7e02.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The StorPool driver enables the ``multiattach`` and ``thin_provisioning`` + capabilities.