Modified limits API to make it return the max number of
share_groups and share_group_snapshots, as well as the total number
of resources used
Change-Id: Ia4e69219b107fc0630cb9e97401b9a8bda5b1adc
Closes-Bug: #1868644
This patch adds new quotas for share replicas and replica sizes.
This quotas can be related to either tenants and users or tenants
and share types. Now, when creating a share replica, manila will
check if there are resources available for that specific request.
Partially-Implements: bp limit-share-replicas-per-share
Change-Id: I8ba7bc6f167c28d6c169b2187d0e1bda7cad3f69
- Add ignores to pylint false positives in the
test modules.
- Remove unnecessary fake data
- Fix wrong mock methods used in tests
Change-Id: I64ffff15cc546c67e7e545b1da7ec0efa002bdc5
Extension 'used limits' was extending core 'limits' API with used
resources information. So, provide such information in core API and
remove extension completely.
It does not require neither update of API router nor bump of
microversion.
Partially implements bp ext-to-core
Change-Id: I0ff71fbd0281eb2e34a9acbfc72ff8c14390e8d9
Fix incorrect order assertEqual(observed, expected) as below.
assertEqual(observed, expected) => assertEqual(expected, observed)
Target of this patch:
manila/tests/api/*
Note:
I also fix following asserts aruond above fixed parts.
assertEqual(xx, True), assertEqual(True, xx) => assertTrue(xx)
As for assertFalse,
I do not convert assertEqual(xx, False) to assertFalse(xx)
because assertFalse(None) does not raise exception.
Change-Id: I8131946efef654235b5e32344b3f5e42ab3d3ced
Partial-Bug: #1259292
Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.
Closes-Bug: #1280522
Change-Id: I2d5285add72678b5a61b4f66879c4d066afc34c7
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
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
The Manila test module uses a class called StubOutForTesting, which
is an awkward holdover from when the unit tests were using Mox.
Alex wrote a more elegant and capable mocker method,
manila.test.TestCase.mock_object, in the Cinder project which we
have now added to Manila. So to remove the duplicate functionality
and legacy code, all references to self.stubs.Set() in the Manila
tests should be replaced with self.mock_object() and any related
dead code should be removed.
Resolves-bug: #1415602
Change-Id: Ie5f203c0b2cb57ad00d9ec8db0529075b6fef261
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
six is the canonical compatibility library for supporting
Python 2 and 3 in a single codebase.
The xrange module was removed in Python 3 and we should
use 'six.moves.range' instead of 'xrange' to make
code compatible with py 2 and 3 as well.
Partially-implements blueprint py3-compatibility
Change-Id: Id054857f320d9eda02bc0b82e5512c0595342290
Replace usage of deprecated jsonutils module from oslo-incubator
and use oslo.serialization instead.
A followup-patch will sync with oslo-incubator and remove
the jsonutils module from manila.
Partial-Bug: #1382189
Change-Id: Iafa5090fd0c960ae8e996229ea3352f890decc6c
Use six.text_type instead of str for exceptions to allow lazy
translations with oslo.i18n.
Remove some unneeded msg assignment.
Change-Id: Ie26c2b90503f130f69444cfb51bf5cef8f592f98
It is python 2/3 compatibility change.
six.StringIO an alias for StringIO.StringIO in Python 2 and
io.StringIO in Python 3.
Partially implements blueprint py3-compatibility
Change-Id: Ib2f570645d3b0a4b3bd38c017693e0b1b77f3236
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 and enable flake8 test H404:
H404 multi line docstring should start without a leading new line
Change-Id: I13dc13bb5e81d65300680df094cde538c7a6f6df
Partial-Bug: #1333290
Enable F841 and fix all issues.
Flake F841 is:
F841 local variable 'XXX' is assigned to but never used
Also fix in changed files some occurences of:
E128 continuation line under-indented for visual indent
H404 multi line docstring should start without a leading new line
H405 multi line docstring summary not separated with an empty line
Change-Id: Ifb08a82d05ac15c8e90f214a96e73d82ff850018
Partial-Bug: #1333290
Fix and enable hacking test:
H402: one line docstring needs punctuation.
Fix testsuite, the change for manila/tests/api/extensions/foxinsocks.py
needs corresponding changes.
Change-Id: I587cd6771787ca56b1410f86a6ec13380bcc206b
It allows us to use a bunch of skip
decorators, addCleanup method with
2.6 and 2.7 python versions.
Provides more strict usage of setUp
and tearDown methods.
Change-Id: I62144ba43d62e3becb90427d5d6600f97db458df
Current max limit for snapshots in manila has same name
as cinder does. It causes overwrites in horizon.
Change-Id: I8504b4c378809a4f307057bcb77efc0293822a91