* vzstorage: replace a/b with a//b to use integer division on
Python 3.
* fix os.path.exists mock: only override return for path /fake
(shares config)
* tests-py3.txt: add cinder.tests.unit.test_vzstorage
Note: remove also spaces in parameters in two functions calls to
respect the PEP 8.
Partial-Implements: blueprint cinder-python3
Change-Id: I7cee7009d8bc87cd0294e90cb2967f4560276994
In the config module default=None is set as the default value,
so it isn't necessary to set it again when doing config options.
Change-Id: I09989ab679d249a9f7dea6af5d53c14dd1726e09
Closes-Bug: #1323975
* _filter_datastores(): replace filter() with list comprehension
to get a list on Python 3.
* tox.ini: add test_vmware_datastore to Python 3.4.
Partial-Implements: blueprint cinder-python3
Change-Id: Ide4e4adf012e155b99b528ddde937df1a48a079b
In cmd.manage and volume.api we had code accessing DB API directly.
This should be done through Service versioned object instead and this
commit fixes that.
Change-Id: I7c65323279b86c37fce7ffeb2b2626508842edfb
Closes-Bug: 1513806
* Set configuration.nfs_oversub_ratio, otherwise tests
fail with TypeError on comparison between mock.Mock and int.
* tox.ini: add test_tintri to Python 3.4.
Change-Id: Ie2b5215795481bdfb11116876d83ef777a10c224
Partial-Implements: blueprint cinder-python3
After introducing the commit 93d26e40098c966e7d791a9fb6152244a9f9409d
unit test TestCinderAllCmd fails if a test environment has
/etc/cinder/cinder.conf with proper backend configuration.
We should mock out some variables not to depend on test environment.
Change-Id: I3218f6be1c38ed228aa96346d6976a04ecb8d421
Closes-Bug: #1513263
Currently the existence of mount.nfs is checked by executing
the relative binary 'mount.nfs' with a non-root user,
in this case cinder. This results, for example on SUSE, in the error:
NfsException: mount.nfs is not installed
Because mount.nfs is located under /sbin, unprivileged users
do not have /sbin in their PATH to search for executables.
The change runs the mount.nfs check by using the absolute binary
path /sbin/mount.nfs. This seems to be common for most distributions
(SUSE, RedHat, CentOS, Ubuntu, Debian). The check can still be executed
as non privileged user, by not relying on correctly set PATH variable
and using the absolute path.
Change-Id: I3c1ecfdadd9ea492d58d69cbdf33045b002668c7
Closes-Bug: #1510150
Other projects have updated to 1.8 or later for the minimum
tox version (nova, neutron), so we should probably do the
same.
Change-Id: Iddb9ab286519d555671ec39c0ce75c9351025730
This patch uses the set extra-specs while cloning a volume. All
existing extra-specs: 'nimble:encryption', 'nimble:perfpol-name'
and 'nimble:multi-initiator' are being reflected in the cloned
volume.
In the existing code, the extra-specs were not being considered
while cloning volumes; the parent volume attributes were used
directly in the cloned volume. This patch uses the extra-spec
values if they are set or if not then uses the default values
for the same.
Change-Id: I7610377e557720038f77ebd318422456e658e2ce
Closes-Bug: #1507821
This patch improves get_volume_stats method to invoke
dog command in SheepdogClient Class method instead of
in SheepdogDriver class method directly. Here are two
benefits we can realize as a result:
1.The current implementation can only get volume status
by local sheepdog node, but the SheepdogClient Class also
supports the method to run dog command with remote sheepdog
node.
2.SheepdogClient Class methods are implemented to run dog
command with fine grained Error handling. So it can improve
the robustness and is more readable to run dog command in
SheepdogClient Class method.
Change-Id: I64ca193cd50e6914d0d5fb6cf711c760dfb65b8c
Closes-Bug: #1512287
Add a new zone with cisco zonemanager driver. If the added zone
name is the same as the existed name, the function delete_zones
will be called. But it fails because of passing a argument with
incorrect type. This patch fixes this error.
Co-Authored-By: Al Lau <alau2@cisco.com>
Closes-Bug: #1496283
Change-Id: Ib340b6828cfeb2bb318db23971268c7974ecc9f6
Currently extra specs are only shown to the admin user
when showing volume types. This patch grants the flexibility
to grant other users privelages to see them based on policy.
It also hides the extra_specs entry in the dictionary from
users who can't see it rather than just showing "None" as
the value.
Closes-Bug: #1504577
APIImpact
Change-Id: Ia8f71180f048ba9b253e35ee136915812ef8df0c