Some of the APIs implemented in manila.compute.nova.API are not used
by any implementation. This change drops unused implementations rather
than keeping them maintained for no use.
Change-Id: I5195c31c6a95ed22eb89d734f3eea6a077eb2f68
Currently images are managed by Glance, instead of Nova, and these
implementations are no longer used.
Change-Id: Iabd4591b6782b135faa137a1e14a1fb760127ee6
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
remove usage of six library from the following directory:
1:common
2:data
3:db
4:message
5:network
6:scheduler
Change-Id: I9db0abf2b0847157074ca6ba84b5451bfe3f20d0
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
Glance image list API supports pagination, but `_get_service_image`
uses novaclient.glance.list() that only return images in one page.
When the image needed by share server is not returned in the first
page, the exception occurs. This patch uses `find_image` method
to get the image.
Since latest novaclient has no proxy to lookup image, so only
novaclient.glance.
Change-Id: I57b15b7ebb29c545c9780a90734988565fa1f6b7
Closes-Bug: #1844046
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
Cinder, nova, neutron has deprecated some default options
since last release, so it is time to remove those options
in this version. refer to the following deprecation patch.
Ref: https://review.openstack.org/#/c/290511/
Closes-bug: #1766384
Change-Id: I595ff2c82ef40566145fedb202e549be69c45e0c
Novaclient has removed lots of proxies to other clients such as
'images' [1], 'networks' [2] and 'security_groups' [3].
So, fix incompatibilities the way we can work with old and
new novaclient versions.
[1] I2d9fd0243d42538bd1417a42357c17b09368d2a5
[2] I8c520100a0016eed3959619c71dae037ebd72939
[3] I6fa14f43d48f1e035ef54bd2d0078506f0c6d6e0
Change-Id: Id7383329b2491f76579f042cbed06585c2214815
Closes-Bug: #1691445
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
Using the generic driver needs a service instance. The variable
"service_instance_name_or_id" indicates that it's possible to use
the UUID or the name of the Nova VM. Using the VM name currently only
works, when the instance is in the current tenant.
This fix searches the instance at first in the current tenant and
if not found, it searches again over all tenants.
Without this fix, you get the following error when using the name:
Failed to get Nova VM. No server with a name or ID of 'myname' exists.
Change-Id: I8770eff9752b76ebe490abf03a7ea6548282bf9b
Closes-Bug: #1535775
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
If Novaclient returns exception, then Manila wrapper for Novaclient
fails with following error:
File "/opt/stack/new/manila/manila/compute/nova.py", line 160, in wrapper
return res
UnboundLocalError: local variable 'res' referenced before assignment
So, fix it and cover with unit tests.
Change-Id: I5eec4b9e9f3857307daa2ade516f76c044c01631
Closes-Bug: #1530811
We should use 'client interface' for initialization of novaclient
instead of direct import of some specific client.
Change-Id: I3172051e4dbba4eb17382cb1393b67829d8c0191
Closes-Bug: #1493576
Use novaclient for creation of keypair instead of openstack client in
devstack plugin, because the latter is not compatible with
nova microversion 2.1
Also, specify explicitly Nova API version in manila wrapper over
novaclient that is used by Generic and Windows drivers.
Also, revert back amount of tempest threads for Ci jobs to avoid job
timeout failures.
Also, fix raise of SnapshotBuildErrorException in Tempest plugin.
Tempest tries to raise exception SnapshotBuildErrorException from wrong
place. It should use "share_exceptions" instead of "exceptions".
Change-Id: Ie9ea9f6d25a13f8cd8f0ccbc73f6fa75cca35e0b
Closes-Bug: #1493008
Closes-Bug: #1493072
This patch proposes a new share driver, handling Windows service
instances and exporting SMB shares.
WinRM is used for managing the service instances, allowing
password or certificate based authentication.
A new service instance manager is introduced, handling Windows
instances. One requirement is that Cloudbase-Init is present on the
instance.
If AD credentials are provided via security services, the instance
is joined to an AD domain. This can be leveraged in order to set
user based permissions.
A CI testing this driver will be up by L-3. Meanwhile, a link to
Tempest results can be found on the blueprint page whiteboard.
Change-Id: Ice5ee63ee4dc2cfcb41567214c165c2705421920
Implements: blueprint windows-smb-support
Currently v1_1 version of novaclient is deprecated, so it's required
to switch for v2 version of novaclient.
Change-Id: I824e8659febfeb86721b610a03a8c3027042cb3d
Share drivers that handle share servers use network plugins to setup networking
for share hosts. And there were no support for nova-networking.
Add two new network plugins, both use Nova networking:
- NovaNetworkPlugin, uses network ID provided by share-networks
- NovaSingleNetworkPlugin, uses network ID defined within config
by opt 'nova_single_network_plugin_net_id'.
Both have same possibilities restricted by Nova networking:
- supported network types: 'flat' and 'vlan'
- supported IP versions: '4' and '6'
- support any amount of IP addresses to be dedicated/provided for share servers
while network has available/unused IP addresses.
Implements bp nova-network-plugin
Change-Id: I6391f168d93107d9152132830afde896aba2180a
Till that moment it was possible to use Generic driver only with Neutron.
Nova network still is used in various deployments, so add support for it.
List of changes:
- Split service_instance to two parts - compute and networking.
- Implement networking part as 'network helpers'.
- Add new config option 'service_instance_network_helper_type' that supports
only two values - 'nova' and 'neutron' respectively.
It is required option. Default value is 'neutron'.
Details on Nova-network approach:
- Due to resctrictions of Nova network, where security group rules are applied
to all VM network interfaces, no need to create service network, because it
will be just duplication. Service instance will use only one network that is
provided within share-network entity.
- Host of manila-share service should have network connectivity for all
networks, that are going to be used for share creations.
- Nova network helper does not create resources, so, network is not configured
by Manila in that case. So, network infrastructure can be either flat or using
VLAN segmentation as well.
Implements BP nova-network-support-in-generic-driver
Implements BP split-service-instance
Change-Id: I7462fe3d6fa944d391628b8e2b374cf5593924ea
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
Add possibility to run Generic driver without handling of share servers. It
allows us to create shares, without share-networks defined, on one specific
Nova VM.
Added three (3) new config options that are used only with new mode:
- 'service_instance_name_or_id' expects string with name or id of Nova VM.
- 'service_net_name_or_ip' expects name of network that Nova VM is switched to
or IP itself. Used for handle operation of share.
- 'tenant_net_name_or_ip' expects name of network that Nova VM is switched to
or IP itself. Used for exporting share to end users.
All three new config options are required if new mode is enabled.
They will be skipped if driver mode with handling of share servers is enabled.
Implements bp single-svm-mode-for-generic-driver
Change-Id: I48864b002e4174728136d093b1a17dad2edec605
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
Change certicates to certificates in help line for
nova_ca_certificates_file.
Change-Id: I4556976a28d8146c8ddc9fe358cabed086000155
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
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
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
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 the following issues in some files:
F401 'XXX' imported but unused
E123 closing bracket does not match indentation of opening bracket's
line
E126 continuation line over-indented for hanging indent
E128 continuation line under-indented for visual indent
E129 visually indented line with same indent as next logical line
H904 Wrap long lines in parentheses instead of a backslash
Partial-Bug: #1333290
Change-Id: Ic9b3a1e47fd24d2835f35f2ef71c4519908ff049
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 nova instances to reach multitenancy,
so this patch adds a module for interacting with nova.
Partially implements: bp generic-driver
Change-Id: Ic51971f0fe72bcbbe364e8f6aa4c59a8ec267c83