Unit test was added that copied a test using ddt for supplied
values passed in, but the new test did not used ddt. This just
moves the values of those parameters into the body of the test.
It keeps the variable names to help keep the intent of the
values clear.
Change-Id: I5148f9500b0578dae457a9b561def8568165fbd1
Create a volume from an image, choose "eagerZeroedThick" volume_type.
But login in Vcenter, you will get a "lazyZeroedThick" volume. There
is no problem when creating a blank vmware volume.
The reason is: when creating a volume from image, if volueme_size
> image_size, the last step is to extend backing volume. In the method
extend_virtual_disk(), there is a parameter "eager_zero", which
determining if the free space is zeroed out. The param "eager_zero"
default value is "False", and not to be changed to "True" in creating
an eagerZeroedThick volume from an image. So the actuall volume type
is different with designated volume type.
We can add a paramter "disk_type" in _extend_backing() method,
determining which type disk to extend. Then pass "False" or "True" to
extend_virtual_disk() as "eager_zero".
Change-Id: I29978b69d21c2583da152f9fbf1264ada8f079e6
Closes-Bug: #1777430
Drivers should not be handling this value. Let Cinder core take care of
allocated_capacity_gb.
Change-Id: Id2ceb77cd80a8fbd22243f29190717928817a7b4
Closes-Bug: #1746222
Signed-off-by: Kien Ha <kienha9922@gmail.com>
allocated_capacity_gb should not be reported by drivers and let the
volume manager handle this.
Change-Id: Ief53a578f96384ab945598b4a67337dd8b8349f8
Closes-Bug: #1746221
Signed-off-by: Kien Ha <kienha9922@gmail.com>
There are a lot of DeprecationWarning message emited when running
under python 3.6 due mostly to non-raw strings being used for
regex expressions.
DeprecationWarning: invalid escape sequence \
These had previously been ignored, but starting with python 3.6,
and the commit for issue 27364, these are now considered deprecated
and will no longer be supported going forward. Per the discussion
on that issue, these strings should really be raw strings any way:
https://bugs.python.org/issue27364#msg272696
Change-Id: If6ff206e4bbcf10ab52d2895f606dafad2936ddb
Newer versions of this library have been out for awhile now
and appear to be working well. This raises the minimum version
for rtslib_fb to a recent version that does not require the
conditional import due to the namespace change from rtslib to
rtslib_fb.
Depends-on: https://review.openstack.org/575530
Change-Id: I10f48833c2a61b7b2c6b300d4f8291a357f7e600
Use of contextlib.closing causes pylint to not recognize the
type and causes "no memeber" errors. Since this is a locally
defined class that can simply be made into a context manager,
this removes the use of contextlib and handles it directly in
code.
Change-Id: I2b284b1ba51f848c183c3895948131de9e89d300
Rather than formatting a string to pass as the exception initialization
it was passing in a tuple of the format string and value. This changes
it to perform the string formatting correctly.
Also fixes up a whitespace issue in one of the other exception strings.
Change-Id: I12648a8806bdbb3ef7933d3f256a2c0213219302
A couple decorators used within the Solidfire driver were defined
as class methods rather than their own functions. This results in
the pylint errors:
"Method should have \"self\" as first argument"
Since these do not need access to self, there is no reason they
should be class methods. This moves them out to be their own
functions.
Change-Id: Ia4da36987783fb0e3f2c44857a3cf9d586c5e769
The create_destination_flexvol method gets provisioning
options from the source volume, but also explicitly sets
the volume_type for the flexvol. Since volume_type is
part of the source volume attributes, this results in
volume_type being provided twice and the pylint error:
"Got multiple values for keyword argument 'volume_type'
in function call"
Since the volume_type needs to be explicitly set, this
overwrites whatever is gathered from the source volume.
Change-Id: I6e597d1b44af2332e538c48d12e79ab745a5c9b5
Closes-bug: #1777911
The default process concurrency for pylint is 1. Since our gate
images used to run the job have 8 cores, this results in slower
job execution with many cores sitting idle. To speed things up,
this sets the process count to match the number of cores available.
Change-Id: If4ba3333a1cb3b8bb6b4797f9149f412d32047ef
Since filter key will be recognized as the object attribute inside
Cinder, this change will disallow any filter whose key contains
non ascii character.
Change-Id: I66ec74e1396f4fa42fd855988265990a535c333b
Closes-Bug: #1766965
Issue: After group failover, subsequent operations
like attach & detach volume, which are part of that
failed over group points to primary backend instead
of secondary.
This patch fixes the above issue by setting up the
appropriate backend in case of subsequent operation
on volume, which are part of group which is failed
over.
Change-Id: I679b11317c91ad28cefdf995a8d6849dc71bc1c5
Closes-Bug: #1773069
This patch removes 'message' from format argument
of 'NexentaException' and 'BadResetResourceStatus'
exceptions.
We should not use 'message' as a format argument
and the reason is described here [1]. From a long
time view we need remove them from exceptions rather
than remove it when initialized.
[1]: https://review.openstack.org/#/c/572674/
Change-Id: Icc0e4aefecbd224a4c14bdaef64b62ec0cd68968
Pass the 'client' and 'ioctx' paramters to the RBDVolumeProxy() to
reuse external connection that already established, which will reduce
load to the ceph cluster.
Change-Id: I14f41bd10242c037301bc97986c95d72954d7bcc
This patch solves the problem of too slow initialization of
cinder-volume service.
Previously lsvdisk() was called separately for each 'in-use' volume
in order to check if the volume exists on the storage.
Now lsvdisk() is called once per pool.
Change-Id: Ia84afc12a30ea7b714b287844e81ba02ce4b0f3d
Closes-Bug: #1749687
Now cinder had some Versioned Objects which names do not
match their ORM counterparts. In method: get_model_for_versioned_object,
we handles those exceptions.
This patch fix this issue to keep the names match.
Change-Id: Icf709d87be99df95e5b52204032b730cd790096c
Closes-Bug: #1493112
Moved db_data directory to ~/.blockbox/db_data because it's owned by
MySQL in the container so tox will failed with it during *.pyc files
cleanup.
Change-Id: Ib2c57d57193cd94108927bfd3a4bf944941976e9