Authorization errors when connecting
to nova/glance/neutron/cinder can be raised as
BadConfigurationExceptions in the logs. We shouldn't
be raising exceptions derived from the service client
libraries.
Change-Id: I2d47dbb1251dfa8d529f813724fb7fd97d7d3a0b
Closes-Bug: #1921927
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
In the past, the options ca_certificates_file,
nova_ca_certificates_file, cinder_ca_certificates_file,
api_insecure, nova_api_insecure, cinder_api_insecure
were supplied to instantiate nova, neutron and cinder
clients. These options have now been subsumed in a more
generic way into the Keystone session logic as 'cafile'
and 'insecure'. Deprecate the older options in Stein so
that we can remove them in a future release.
This deprecation began many releases ago when we switched
to using keystone sessions [1]. However, we were still
overriding the values of "insecure" and "cafile" if provided,
forcing users to continue using deprecated parameters
"api_insecure" and "ca_certificates_file". So despite
this fix originating in the Stein release, it would be
prudent to backport it to all maintained releases and
remove support for these older options in/beyond Train
release (9.0.0).
[1] Ic211a11308a3295409467efd88bff413482ee58d
Change-Id: I148e9079c7c1ab119f519f727d4ad97758473325
Related-Bug: #1802393
Closes-Bug: #1809318
Since cinder has been deprecated v2 api since Pike, So the
v3 cinder client should be used here to create share volume.
Also remove previously deprecated cinder client options.
Change-Id: I314f36637ab45faa638732238c438bf00cc641ea
Closes-Bug: #1733786
oslo.config has deprecated the enforce_type parameter to
set_override() and set its default value to True [1],
so remove this usage from our codebase. Also remove
explict str() cast of mock.sentinel_password in
Windows driver since it should no longer be expected.
[1] Ifa552de0a994e40388cbc9f7dbaa55700ca276b0
Change-Id: Ic02cbb37c6dbf30cacb1e6e290bfb0986f54d5f3
Since change [1] it is impossible to set endpoint_type and region_name
for nova, cinder and neutron clients that are used by manila in some
cases.
So, to fix it, add additional options called 'endpoint_type' and
'region_name' for each of config groups related to these clients.
These options can be defined in appropriate config group as following:
[nova]
endpoint_type = publicURL
region_name = SomeRegionName
[cinder]
endpoint_type = internalURL
region_name = SomeRegionName
[neutron]
endpoint_type = adminURL
region_name = SomeRegionName
[1] Ic211a11308a3295409467efd88bff413482ee58d
Change-Id: I6be0e77bbc0e4b1e9905eba7a7b48ff540e9e377
Closes-Bug: #1633454
Each config option has limitation for type and value. If we use
method CONF.set_override without parameter enforce_type=True, we
may pass wrong type to config option.
This commit makes sure calling method CONF.set_override with
enforce_type=True.
Change-Id: I700dcd21941c6399c51e11bef2282e1e4565e85a
Closes-Bug: #1517839
This fix basically ports nova fix https://review.openstack.org/#/c/136931/
plus additional bug fixing to Manila. It creates a common class to get
used for all clients (neutron, nova, cinder).
Idea is to create an auth session and pass this to the client object
instead of let the client do that. The auth session will be created by
a config group which means the configuration for the clients needed to be
heavily reworked. Patch is also backward compatible with old options but
flag them as deprecated.
DocImpact
Change-Id: Ic211a11308a3295409467efd88bff413482ee58d
Closes-bug: #1555093
Fix incorrect order assertEqual(observed, expected) as below.
assertEqual(observed, expected) => assertEqual(expected, observed)
Target of this patch:
manila/tests/scheduler/*
manila/tests/volume/*
and all others
Change-Id: I063d35c01835ed6a5c62f016274b02e29333aade
Closes-Bug: #1280522
Add implementation of manage_existing() to Generic driver.
Generic driver accepts only one driver_option 'volume_id'.
If an administrator provides this option, then this Cinder
volume will be managed by Manila as well.
Partially implements bp manage-shares
Change-Id: I8767a7af75d575c57e8708563fa4a6bf2f4aa8ad
The Manila test module uses a class called StubOutForTesting, which
is an awkward holdover from when the unit tests were using Mox.
Alex wrote a more elegant and capable mocker method,
manila.test.TestCase.mock_object, in the Cinder project which we
have now added to Manila. So to remove the duplicate functionality
and legacy code, all references to self.stubs.Set() in the Manila
tests should be replaced with self.mock_object() and any related
dead code should be removed.
Resolves-bug: #1415602
Change-Id: Ie5f203c0b2cb57ad00d9ec8db0529075b6fef261
Add configuration option cinder_volume_type which can be used
to set volume type for cinder. If that option is not None then
cinder volumes will be created with type from that option.
Implements blueprint cinder-volume-types-with-generic-driver
Change-Id: Ica171410bfdfa001da5188450a0c3740b4b8eb65
Fix these issues and enable E126 and E127:
E126 continuation line over-indented for hanging indent
E127 continuation line over-indented for visual indent
Also fix a few occurences in the touched files of:
E128 continuation line under-indented for visual indent
H405 multi line docstring summary not separated with an empty line
Partial-Bug: #1333290
Change-Id: If822401fc7e1db49d595a0736a0dff8e00dfd217
Generic driver will use cinder volumes as back-end for shares,
so this patch adds a module for interacting with cinder.
Partially implements: bp generic-driver
Change-Id: Ide3d98efa8cf38994548934ad445f3561f5e3106