Commit Graph

17 Commits

Author SHA1 Message Date
Valeriy Ponomaryov 9912d296ec Port admin actions extension to core API
Changes:
- Register admin actions API as core API.
- Remove extension code for admin actions.
- Leave rename of admin actions API 'post' data for future update which
  will be done with bump of microversion
  after port of all extensions to core API.

Partially implements bp ext-to-core
Closes-Bug: #1510620

Change-Id: Ic8804cff5fa46003d2991372c6eb2a854b886dec
2015-11-12 14:58:04 +00:00
Clinton Knight dddc068879 Add v2 Manila API path as base for microversions
To prevent a microversioned client from managing a non-microversioned
Manila server, Manila must update its REST endpoints by adding /v2 for
all microversioned APIs.

This commit does the following:

* Add /v2 to the URL map, connected to all the same /v1 API methods
* Renumber the microversion sequence starting from 2.0
* Update the versions API to reflect v2
* Publish the new endpoint to Keystone in the DevStack plug-in
* Update relevant documentation
* Update Tempest tests for microversions
APIImpact
Co-Authored-By: Andrew Kerr <andrew.kerr@netapp.com>
Closes-Bug: 1488624
Change-Id: I56a516b5f81914557dd2465746629431cfd6deac
2015-09-10 13:58:26 +00:00
Rodrigo Barbieri 0524ab8fc2 Add Share Migration feature
Share Migration allows a share to be migrated from
one host#pool to another host#pool through the
"manila migrate <share> <host#pool>" command. It first
calls the driver to perform it in an optimized way if
possible. If the driver returns that it did not migrate,
it performs a generic migration.

A new field has been added to "shares" table: task_state,
which tracks migration status.

For driver migration, the method migrate_share in driver
base class should be overridden.

For generic migration, drivers may use new config options
to achieve the necessary configuration:
- migration_mounting_backend_ip: If backend has additional
exports IP for admin network, specify it here.
- migration_data_copy_node_ip: IP of entity performing
migration between backends, such as manila node or
data copy service node. This may not apply for
DHSS = true drivers.
- migration_protocol_mount_command: specify mount command
with protocol and additional parameters. Advisable to restrict
protocols per backend. Defaults to "mount -t <share_proto>".

If additional customization is needed, drivers may override
certain methods:
- _mount_share: return the mount command.
- _umount_share: return the umount command.
- _get_access_rule_for_data_copy: return an access rule with
the IP address which will allow the manila node or data copy node
to mount the share after added permission through
allow-access API command.

Change-Id: I8dde892cb7c0180b2b56d8c7d680dfe2320c2ec7
Implements: blueprint share-migration
2015-09-06 22:52:41 -03:00
Alex Meade 680fd50d3e Add Consistency Groups API
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
2015-09-05 18:21:17 -04:00
Igor Malinovskiy 91e438b40e Add Share instances Admin API
Add admin API which allows:
- Get share instances of given share
- Get all share instances
- Get share instance details by id
- Reset share instance state
- Force-delete share instance

Add appropriate unit and tempest tests.

APIImpact
Change-Id: Ie96dfc18b491cb4d9705da4eaca5bc4ce43225ea
Partially-Implements: blueprint share-instances
2015-08-31 13:41:17 +03:00
Valeriy Ponomaryov ed6ed47202 Fix string/binary conversions for py34 compatibility
Default type of strings in py 2 and 3 are different. So, convert them
explicitly when it is needed for py 2/3 compatibility.

Partially-Implements: bp py3-compatibility
Change-Id: I9b2d7e97fdc7d073a16e729ce0e90b92281fdf8d
2015-08-07 15:33:36 +03:00
Valeriy Ponomaryov 0a7f44ad07 Transform share and share servers statuses to lowercase
We have several entities in Manila that do have statuses:

- Shares
- Snapshots
- Share Servers
- Share Access Rules

But some share and all share server statuses use uppercase for it.
Make all of them consistent and transform them to lowercase.
Add migrations for it.
Also, remove two unused statuses and reuse all statuses from common place.

Change-Id: I53e6a768c98977d3d94e761349b7446a9dfb4936
Closes-Bug: #1459598
2015-06-02 13:35:44 +03:00
Igor Malinovskiy a26824818f Remove Limited XML API Support from Manila
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
2015-04-13 15:43:47 +03:00
Valeriy Ponomaryov 63a0504c21 Use oslo_log lib
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
2015-02-08 10:42:40 +00:00
Andreas Jaeger 9154f3e55b Flake8: Fix E126 and E127
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
2014-08-23 08:43:02 +00:00
Andreas Jaeger 290769f087 Flake8: Fix F401
Fix:
F401 'XXX' imported but unused
Add noqa where needed, remove extra imports otherwise.

Remove F401 from ignore list.

Partial-Bug: #1333290
Change-Id: Ib71f0dd001c4e4899200b5e60b3a38e4a6c40555
2014-08-23 08:42:36 +00:00
Valeriy Ponomaryov cc0081fd10 Added force-delete action to admin actions
force-delete action will be available
for shares and snapshots with admin creds.

Partially implements: blueprint manila-client-enhancements

Change-Id: I896e8a83109879b96f0d7ef2ca2e52fcb7528bb3
2014-06-06 10:52:42 +03:00
Christian Berendt 79cd06323c debug level logs should not be translated
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
2014-05-13 14:13:53 +02:00
Andrei V. Ostapenko a78db60264 Adds an ability to reset snapshot state
Partially implements: bp manila-client-enhancements
Change-Id: Iff9fd0b588b90eae4c9475fe28883322abca8246
2013-12-25 14:25:24 +00:00
Andrei V. Ostapenko 7d4b39d83d Adds admin actions extension to provide reset-state command
Partially implements: bp manila-client-enhancements
Change-Id: I9c2968e7c8c05ce31ac0aafa83f46e2072dce338
2013-12-19 16:06:20 +02:00
Yulia Portnova c112a41151 volume api removed 2013-09-04 10:15:04 +03:00
Yulia Portnova dc4ce932ed Renamed cinder to manila.
Fixed setup.py, fixed bin scripts.
2013-09-02 09:59:07 +03:00