Commit Graph

14 Commits

Author SHA1 Message Date
haixin 7f2b25332a remove usage of six library
remove usage of six library from the following directory:
1:share
2:volume
and some files.

Change-Id: If5bb2976bc54887c74649a00deaeaa71e296aaaa
2022-02-10 02:46:34 +00:00
debeltrami 2bc27c5678 Add security service update for in-use share networks
This patch implements the update of security service's association
with in-use share networks. The following changes were added:

 - New share network APIs: `share_network_security_service_update`
 and `share_network_reset_state`.

 - A new `status` attribute was added to share network model to
 identify when it's in a modification state, called 'network_change'.
 Other supported status that were added: 'active' and 'error'.

 - New 'security_service_update_support' property was added to both
 share server and share network models, to identify when this resources
 are able to process security service update for in-use share networks.

 - New driver interface was added to support update of security service's
 configuration of a given share server.

DocImpact
APIImpact
Partially Implements: bp add-security-service-in-use-share-networks

Co-Authored-By: Carlos Eduardo <ces.eduardo98@gmail.com>
Co-Authored-By: Douglas Viroel <viroel@gmail.com>
Co-Authored-By: Andre Beltrami <debeltrami@gmail.com>

Change-Id: I129a794dfd2d179fa2b9a2fed050459d6f00b0de
2021-03-12 18:37:45 -03:00
Andreas Jaeger 28bb650128 Hacking: Fix E241
Fix:
E241 multiple spaces after ':' (or ',')

Fix also a few other problems found by hacking in files changed.

Change-Id: I4c00551f29ad65df2631c8ae55fe2f022e872544
2020-04-01 09:21:01 +02:00
zhufl e8adec1b96 Fix parameters passed to exception
Do not pass reason parameter to ShareNotFound/ManilaException/
InvalidParameterValue/ShareGroupTypeNotFound/InvalidVolume, for
reason is not in the message format.

Change-Id: I4af25be0d5095c704b40fafbde3fafa298103596
2019-03-19 17:40:40 +08:00
Goutham Pacha Ravi 3e855d5f60 [pylint] Fix/ignore pylint errors in non-test modules
Pylint does not play very well with dynamic object
manipulation in python This creates a lot of
false-positives in the code-base which affects
contributors looking for genuine failures.

So, this change
- adds pylint ignore statements where appropriate
  to disable testing these lines of code and failing.
- replaces all the pylint error codes (they are
  hard to remember/relate to) with error names
  which are easier to understand when reading the
  code.
- initializes sqlalchemy model objects as dictionaries
  which is a valid representation over None.
- removes ignore directives on six.moves which
  is globally ignored in our pylintrc.
- adds alembic.op to the ignored
  modules list since they are not supported by
  pylint and have known issues.

This patch is the beginning of a series of
commits to use pylint in a sane way on manila code.

Change-Id: I44616821c5311d6f14986697efbbe5624de364a5
2019-02-25 17:23:15 +00:00
Goutham Pacha Ravi 4249e94c6b Allow configuring availability_zones in share types
Administrators configure share types and make them
available to projects within an OpenStack cloud.
These share types will define capabilities to match
back-end storage pools that manila provisions shares
within. Administrators may want to limit share types
to specific Availability zones, given they may have
different classes of storage in different availability
zones in the cloud. A major use case of this is edge
computing, where, provisioning can be driven to specific
edge locations with the help of share types.

This commit will:

- Introduce 'availability_zones' as a new common share type
  extra spec that is user visible when configured.
- In and beyond microversion 2.48, validate that the AZ
  chosen in the POST /shares API is supported by the configured
  availability zones for the share type being used.
- Share types can be filtered by AZs through extra-specs:

  $ manila type-list --extra-specs availability_zone=nova

  now gives you all types that explicitly (and implicitly)
  are supported within the AZ 'nova'.

- Improve experimental APIs:
  - Add validation of AZ to POST /share-replicas
  - Add validation of AZ to POST /share-groups
  - Add validation of AZ to
    POST /shares/id {'action': 'migration_start'}

- Also fix old unit tests by using a helper method to
  generate appropriate mock values.

DocImpact
Change-Id: Idf274cd73e3b1b33f49668fca768ae676ca30164
Implements: bp share-type-supported-azs
2019-02-13 17:39:48 +00:00
Goutham Pacha Ravi 4435deb48f Address trivial TODOs
- Add share type access to type view builder
- Remove unnecessary docstring TODO

TrivialFix

Change-Id: I856a3318f498800eab5932b7ad250621ccf4292f
2018-06-18 09:31:25 -07:00
Valeriy Ponomaryov 256b5c84ba Add share groups and share group snapshots quotas
"Quota" APIs now will return two new following keys:

- 'share_groups'
- 'share_group_snapshots'

For user and project, but not share type.
Default values can be configured using following config options:

- 'quota_share_groups'
- 'quota_share_group_snapshots'

APIImpact
DocImpact
Implements BluePrint add-share-groups-quota
Change-Id: I397a8e886226cb22fa50abdf2a4a938bb04c655d
2017-07-26 11:32:43 +03:00
Valeriy Ponomaryov 160a9a113e Fix ShareSnapshotInstance DB table
removing redundant column "share_id" and making it proxy to
"share_instance_id" as it was prior to merge of [1].
It is redundant because there is only one place, in manila, where it is
used, but used without real need.

[1] I81ba26437554d02a79e4b536d781617f46ce2f07

Change-Id: I4ee14cf89b8882941974741da311f4556e604116
Closes-Bug: #1697581
2017-06-16 14:21:55 +03:00
Valeriy Ponomaryov 54b030a3f2 [Share Groups] Squash SGS member and SS instances DB tables
Because the former was implemented just because the latter
was absent yet at that moment. Main reason is that they serve
same goals and should be consistent to each other. And it is
much easier to support one single table instead of two separate
tables syncing them each time we update one of them.

Change-Id: I81ba26437554d02a79e4b536d781617f46ce2f07
Partially-Implements bp manila-share-groups
2017-06-07 15:02:14 +03:00
Valeriy Ponomaryov 283e13384a [Share Groups] Add availability zone support
'Share groups' feature was not finished completely in Ocata timeframe.
There was absent possibility to specify 'availability zone' for
creation of a share group. So, implement it.
The fact of its implementation fixes mentioned bug below.

Closes-Bug: #1662944
Partially-Implements BP manila-share-groups

Change-Id: I000adeb53fe8435465cbedc3c539e6aaae6503c5
2017-06-06 10:13:00 +00:00
yfzhao 059fae0ed5 Remove log translations in share and share_group 4/5
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.
This is the 4/5 commit.
Old commit will be abandoned: https://review.openstack.org/#/c/447822/

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: Ia46e9dc4953c788274f5c9b763b2fed96c28d60e
Depends-On: I9fd264a443c634465b8548067f86ac14c1a51faa
Partial-Bug: #1674542
2017-03-31 10:20:11 +08:00
Alex Meade d25f101ab4 Manila Share Groups
Remove the experimental consistency group APIs and
replace them with the experimental Share Group APIs.

DocImpact
APIImpact
Partially-implements-blueprint: manila-share-groups

Change-Id: I79a80a62ae4e0015d6161edc2b93fd1f9ba69537
2017-01-23 21:29:12 +02:00
Valeriy Ponomaryov 3e37cd2e5a Rename consistency group modules to share groups
Port of consistency groups to share groups consists of not only
change of logic but also renames of several modules. So, rename
modules first to reduce amount of changes that will be done
in scope of main change.

Partially-Implements BP manila-share-groups

Change-Id: Ie93fa5680c29e2c208ca77f871817abb4cbd9f72
2017-01-23 10:35:13 +00:00