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>
Remove manila configuration options
and auth classes that were deprecated
before the Ussuri release.
Change-Id: I148225926cd249a0dd8d1f8c02b22ed06487f405
Do not pass reason parameter to ShareNotFound/ManilaException/
InvalidParameterValue/ShareGroupTypeNotFound/InvalidVolume, for
reason is not in the message format.
Change-Id: I4af25be0d5095c704b40fafbde3fafa298103596
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
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
This patch removes unused global LOG variable
and logging imports from various manila modules,
and adds a script to be run as part of pep8 that
will ensure that these do not creep back into
the codebase.
Change-Id: I162c4b2478df45aaf6ea8009b102d6de1a4e309e
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
The os_region_name option appeared 2 places
in manila. This change moves them to the core
options list.
Change-Id: I5477c4e8b7c1523615fa50782d1c41e42e5f4fe6
Closes-bug: 1454590
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
Module 'log' from oslo-incubator was removed after release of oslo_log library.
So, start using oslo_log, but keep oslo-incubator code yet other common modules
within Manila codebase use it.
Implements bp use-oslo-log-lib
Change-Id: I88224f7c2bd99adb78140dfc3fa73cea437f29cd
The oslo team is recommending everyone to switch to the
non-namespaced versions of libraries. Updating the hacking
rule to include a check to prevent oslo.* import from
creeping back in.
oslo.messaging is the only exception because this package doesn't
currently support non-namespaced imports.
Change-Id: I3987e651bc880c8ffa7c0105df0298679dcd3a43
Manila uses v1 Cinder API for it's Generic driver.
Cinder v1 API is deprecated and is going to be removed,
see: https://blueprints.launchpad.net/cinder/+spec/deprecate-v1-api
So, update our Generic driver to use v2 Cinder API.
Implements blueprint v2-cinder-api-for-generic-driver
Change-Id: I3cbd713a9a4c6eccee50ba4af4bdf2794db021d7
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
Use importutils from olso.utils instead of the deprecated version
from oslo-incubator.
These four files were missed in the previous change "Use oslo.utils"
with id I4f949de57e333832dcc7c1e256ce82e2db0144cb.
Change-Id: I198ea24a0512c60f11caad7cf8ae8c504442026d
oslo.i18n provides the i18n function that were provided by
oslo-incubator's gettextutils module
Import _ where needed, oslo.i18n deprecated the builtin method.
Closes-Bug: #1382187
Change-Id: I12aa1c725aa4bb52a9aa46e9c3d2b303839de48b
LOG.debug("Hello %s" % xyz) should be LOG.debug("Hello %s", xyz).
This allows the logging package to skip creating the
formatted log message if the message is not going to be emitted because
of the current log level.
Change-Id: Ie0c91cd940017fd80d1d84b0e56780a1da980858
Make help strings consistent:
* Add missing spaces between words
* Capitalize first word of help
* Add "." at end of string
* Improve wording and capitalization
This follows the oslo.config style guide:
http://docs.openstack.org/developer/oslo.config/styleguide.html
Change-Id: I8243909249423b6b58ccda0d800856f46b0953c5
Fix H405:
H405 multi line docstring summary not separated with an empty line
With this patch, flake8 passes all checks (incl. hacking checks)
except the on-purpose disabled check H904.
Closes-Bug: #1333290
Change-Id: If41259aefc4d6d588da5036f1f25df17b88db04f
Fix H302 and enable the test:
H302 import only modules.'from X import Y' does not import a module
Fix also in the touched files the following:
E128 continuation line under-indented for visual indent
Change-Id: I3116c030a5dc0b5be2b4413beaa460e483215774
Partial-Bug: #1333290
Fix pep8 failures, especially:
H402 one line docstring needs punctuation.
E127 continuation line over-indented for visual indent
E128 continuation line under-indented for visual indent
F401 'xxx' imported but unused
Partial-Bug: #1333290
Change-Id: Ia285d30574c3ad51b839823ea934e274f26ce6a3
According to the OpenStack translation policy available at
https://wiki.openstack.org/wiki/LoggingStandards debug messages
should not be translated. Like mentioned in several changes in
Nova by garyk this is to help prioritize log translation.
Change-Id: Idd917acd97481d6b644e307adb002354b37f34a1
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