Nova network was deprecated in Newton and is no longer supported for
regular deployments in Ocata [1].
Complete the removal of nova network support from manila begun in [2]
by removing support for ''nova_net_id`` in the share networks API,
by removing the corresponding column from the share networks DB model,
and by removing the nova network plugins themselves. Unit tests for
share network api views were refactored to remove redundancy while
extending coverage to the new microversion introduced with this patch
and maintaining full coverage of earlier microversions.
APIImpact
DocImpact
UpgradeImpact
Partially-implements: bp remove-nova-net-plugin
[1] http://docs.openstack.org/releasenotes/nova/unreleased.html
[2] I846b760fa7c01f7f86768399a2bfad9ced7e57cd
Change-Id: I8b9a559fbea61979f01737ed1dc272276c4f1269
Get gateway information from network plugin and put it into network_info.
It is required by EMC Unity storage to create a interface.
APIImpact
DocImpact
Change-Id: I8614b8686af7fa5764b49e8e3cb4a4855dc3a5f4
Implements: blueprint add-gateway-info
When deleting a resource (share, snapshot, share-network) the quota
usage of the current user gets updated, which might not be the same
user, who created that resource. That means the quota usage will never
be reduced for initial user.
This fix adds the resources user_id to the quota update statements, to
update the quota_usage for the user, that created this resource,
irregardless who deletes it.
Change-Id: Iefe8f4d0e7c526e3ed94c1994ba62f1a2a929ba2
Closes-Bug: #1542598
Replacing dict.iteritems()/.itervalues() with
six.iteritems(dict)/six.itervalues(dict) was preferred in the past,
but there was a discussion suggesting to avoid six for this[1].
The overhead of creating a temporary list on Python 2 is negligible.
[1]http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Partially-implements blueprint py3-compatibility
Change-Id: Ia2298733188b3d964d43a547504ede2ebeaba9bd
This patch adds the /consistency-groups and /cgsnapshots
endpoints as well as AdminActions for both.
Partially implements bp manila-consistency-groups
APIImpact
Change-Id: I5fd0d3341766fdba4d92f4a43c3d1186e7a4b38e
Introduce new Manila core concepts:
- share instance
- snapshot instance
This is minimalistic commit which assumes that
share and snapshot can have only one instance.
More complicated logic will be implemented in
the scope of share migration and replication
features.
Partially implements bp share-instances
Change-Id: I326c00b8252f2630e72bb0c22ca294f79feee2be
Remove the broken XML support presently available in Manila
in order to comply with the general direction among other
OpenStack projects to support JSON only.
Change-Id: Ibb542fa223f7f7d1bf95f3d1f568987ef839cd12
Closes-Bug: #1440782
Currently tenants are unable to delete share_networks if there are existing
share_servers. This doesn't make sense, because the share_server exists only
for the share_network, and if the tenant is done with the share_network,
then the share_server can go away safely.
Change-Id: I8925f3deba64da6b011516163e5554b8134c8c0a
Closes-Bug: #1429123
We need support of Nova network in API and DB first, before addon of support
of it for drivers.
Changes:
- Extend ShareNetwork model with column 'nova_net_id'
- Add migration with addon of column 'nova_net_id' to ShareNetwork model
- Add support of new key 'nova_net_id' to the API of share networks
- Make it mutually exclusive with Neutron network data
Implements nova-network-api-support
Change-Id: I1b04a74aec6aed1b9bbf6e4deebee726bd0830c2
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
LOG.warn etc. should be translated separately and thus messages need to
be marked with _LW for LOG.warn, _LI for LOG.info and _LE for LOG.errors
and LOG.exception.
Mark all LOG invocations with proper translation marker.
Use ',' instead of '%' when adding variables to log messages to allow
lazy evaluation.
Add new hacking checks for these.
Change-Id: I31d3ee50f30c63d7d647b1c2b1eae50bf96f0c74
Add filtering share-network list by creation date, associated security
service ID, project ID (for admin context only).
Limit share network list using 'offset' and 'limit' options.
Add policy rule for 'get_all_share_networks' action.
Remove 'status' field from returned share nerwork's view,
as share_network model doesn't have such attribute. So, None was always
returned as a status.
Fix DB api function share_network_get_all_by_security_service - second param
should be named 'security_service_id' instead of 'share_network_id'.
Add unit and tempest tests.
Implements bp improve-share-network-list-filtering
Change-Id: I7c3e44068fb39672d1d6c9e06527fde2604672a9
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
Use six.text_type instead of str for exceptions to allow lazy
translations with oslo.i18n.
Remove some unneeded msg assignment.
Change-Id: Ie26c2b90503f130f69444cfb51bf5cef8f592f98
When we attach security service to share network and create
share server associated with this share network, security service
or share-network should not be updated as well as deleted.
For update should be available only 'name' and 'description' fields.
Don't allow to remove assigned security-service from share-network
when share-servers exist.
Add unit and tempest tests.
Change-Id: Ide82edea355030b281dc709f8545abfd0fcd13fb
Closes-bug: #1357355
LOG.xxx("Hello %s" % xyz) should be LOG.xxx("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.
The change touches error, warning and info LOG messages.
Adjust test suite for the above change since LOG now uses two parameters
instead of one.
Fix grammar, add missing "." to log messages in some places.
Change-Id: I86404c34502f07ed6dbda1c82b13db888c60f074
Manila should not allow attach several security services
with same type to a share network, for example, two LDAPs
or two Active Directory services.
Add unit tests and fix tempest tests.
Closes-bug: #1358652
Change-Id: Id37e986e537941fe8f9086b8b150d6073c97d1ed
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
Fixes:
manila/scheduler/simple.py:74:45: F812 list comprehension redefines
'service' from line 59
manila/api/v1/share_networks.py:147:41: F811 redefinition of unused
'network' from line 29
Do not blacklist these tests anymore.
Partial-Bug: #1333290
Change-Id: Ibf3c170ada17a7af0708331331bc435942c3763b
Use oslo.db library instead of own implementation.
Oslo.db code contains different utils for work with db api, db session,
migrations, test classes for db testing, tools for automatic retry
db.api query if db connection was lost, etc.
Oslo.db code was tested better as it is currently used in many projects,
there will be no need in testing our own implementation.
In many cases our own implementation of work with db duplicates
oslo.db code.
Remove:
- manila/common/sqlalchemyutils.py;
- manila/db/sqlalchemy/utils.py;
- manila/db/sqlalchemy/session.py;
- manila/db/sqlalchemy/migration.py;
- DBError, wrap_db_error, InvalidUnicodeParameter exceptions;
- db_sync, db_version, db_version_control, _find_migrate_repo
function
and replace it with appropriate oslo.db functions.
Add 'joinedload' statement to db queries if necessary.
Fix unit tests, clean up test_migrations.py
Implements bp oslo.db
Change-Id: I48a4da797594cf020f67f78024bd0f86b5abd5ef
Add server side for share's networks. Implemented controller
will carry user requests to the DB and thus will allow
user to manage share's networks data.
Add share's networks support to the share API.
Partially implements bp: join-tenant-network
Change-Id: Ie4f3945255a049e80083f08a39d7f703a5c75c5e