The parameter 'ext_mgr' is not used in method _setup_routes() in
subclasses:
manila.api.v2/router.APIRouter
manila.api.v1.router.APIRouter
manila.api.versions.VersionsRouter
So it should be removed to make the code clean.
The superclass of them is manila.api.openstack.__init__.APIRouter,
the 'ext_mgr' is removed from method _setup_routers() in superclass.
In method__init__() in superclass, the _setup_routers() is called,
so 'ext_mgr'is removed in related calling statement.
Change-Id: I25e2d5447b328c88c660ae17025f65719290b21b
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
In some Manila source code files, oslo log is imported but not used.
Remove it.
from oslo_log import logging
LOG = logging.getLogger(__name__)
Closes-Bug: #1529254
Change-Id: I06a98b4929e2adb5c43c754799026d4637107bd7
Share instances API has min version as 2.3 and considered as v2-only.
But now it is stored under v1 dir for no reason.
Move it to proper dir and remove from v1 router because it could not
be used using v1 API anyway.
Change-Id: I1e3c306b31235cd422ac339df56147439a7bbace
Closes-Bug: #1521999
After port of extensions to core API we need to rename their URLs.
So, rename URLs and bump microversion for it.
Make new URLs work only with new microversion(s) 2.7+
and old with old microversions 1.0-2.6.
Add separate API router for v2 API as now we should split v1 and v2
logic.
Also, move updated APIs under v2 directory that will be used by both
API routers - v1 and v2.
List of updated collections is following:
- os-availability-zone -> availability-zones
- os-services -> services
- os-quota-sets -> quota-sets
- os-quota-class-sets -> quota-class-sets
- os-share-manage -> shares/manage
- os-share-unmanage -> shares/%s/action
List of updated member actions is following:
- os-share-unmanage/%(share_id)s/unmanage -> shares/%(share_id)s/action
- types/%(id)s/os-share-type-access -> types/%(id)s/share_type_access
List of updated action names is following:
- os-access_allow -> access_allow
- os-access_deny -> access_deny
- os-access_list -> access_list
- os-reset_status -> reset_status
- os-force_delete -> force_delete
- os-migrate_share -> migrate_share
- os-extend -> extend
- os-shrink -> shrink
List of updated attribute names is following:
- os-share-type-access -> share-type-access
Partially implements bp ext-to-core
Change-Id: I82f00114db985b4b3bf4db0a64191559508ac600
Almost every API method written in Manila performs
a policy check against relevant policies in etc/policy.json.
A method - authorize() was introduced in
manila/api/openstack/wsgi.py
in commit e4428f5e6c
to perform these policy checks.
This patch refactors the authorize() method as a decorator
for consistency and easy usage in APIs that choose to
implement the policy check prior to any core logic.
Prior unit tests are modified for the APIs impacted through
this change.
The Cgsnapshots controller's policies are corrected for
name consistency without impacting behavior.
Change-Id: Ib34e166ab65513f8f02215c6569175fc9a913244
Closes-Bug: #1515397
Changes:
- Register share type APIs as core API.
- Remove extensions code for share types.
- Leave rename of 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
Change-Id: I334cc0fa8e69c2f9b5226f247149a0b9b748dd60
Changes:
- Register quota and quota class sets API as core API using old links.
- Remove extensions code for quota and quota class sets.
- Leave rename of API urls 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
Change-Id: I642e6dc78fd908a4850afc61505dcf34d330acca
Changes:
- Register services API as core API using old link.
- Remove extension code for services.
- Leave rename of API url 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
Change-Id: I06005e8339f16c404d3f1ff9917480603801d44f
Changes:
- Register manage/unmanage API extension as core API using old links.
- Remove extensions code.
- Leave rename of API urls 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
Change-Id: I773398f13f4b3e4637599cb482a5a2c189958656
Changes:
- Register availability zones API as core API using old link.
- Remove extension code for availability zones.
- Leave rename of API url 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
Change-Id: Ifc75ef2d16121634ad12e5e12960c928e4d24b90
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
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
The OpenStack API working group recommends all projects adopt
Nova-style microversions for versioning their REST APIs. This
commit ports the Nova microversion code and docs to Manila.
With this patch, the API version is bumped to 1.1, and the
versions API (which has always returned horribly outdated
values) is the first API that is versioned. The 1.1 version
of the versions API includes the minimum and current API
version values.
Implements bp: manila-rest-api-microversions
Change-Id: Ifa8e394335a4eb3ad21f53a873530aee241c00e8
The scheduler API 'get_pools' was copied from Cinder and has several
problems. The REST endpoint, /scheduler-stats/get_pools, is not a
REST-appropriate name. The API allows filtering but filters are not
currently supported by the Manila scheduler. The API was added as an
extension, not part of the v1 API as it should be. After restarting
the scheduler service, the API doesn't return any data until a share
has been created (Cinder was used as a model for fixing this one).
This patch fixes all of these issues.
Closes-Bug: #1422042
Change-Id: I7e32efb5390fd4b0a62f644ca5a12dcad14d8a9b
Horizon and other clients should be able to retrieve
default volume type via manila API for proper
validation and UI rendering.
Partially implements blueprint default-volume-type
Change-Id: I89d03efb791e40f05935d562917703b6adaf3268
This change adds support for share_type, share_types, and share_type_id
along side the corresponding volume_type, volume_types and
volume_type_id fields in the API. This change was made as share_type and
its references are more intuitive in comparison to volume_type.
Both entries are returned to ensure API compatibility but preference is
given to share_type[s,_id].
The database migration introduced in this change should work on MySQL
and Postgres, but will not work on SQLite. Because there is no point
in supporting SQLite, tests for it are removed.
Implements blueprint: rename-volume-type-to-share-type
Change-Id: Ifa23ee6520b5238c7de3d5bce7b7bbde02a4a61d
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
Fix and enable flake8 test H404:
H404 multi line docstring should start without a leading new line
Change-Id: I13dc13bb5e81d65300680df094cde538c7a6f6df
Partial-Bug: #1333290
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
Now on share creating, we can specify metadata and it
will be saved in database. Also support of setting,
deleting and updating metadata info was added.
Adds model for share metadata
Adds migration
Adds api extension for share metadata
Adds relative api functions
Partially implements bp manila-client-enhancements
Change-Id: Id421323dd9e947d536b577092f1875f178d9aba5