121 Commits

Author SHA1 Message Date
Goutham Pacha Ravi
ec55c1a80e Validate API sample JSON files
We are maintaining these files by hand,
so errors are bound to creep in.

Change-Id: I1f5bbf8d5fcd396dfe63b9bf3ef95306c03765a4
2019-08-13 22:16:46 -07:00
Andreas Jaeger
7916986e64 Update api-ref location
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.

Note that the location API location /shared-file-system and not
/shared-file-systems.

Note that redirects will be set up as well but let's point now to the
new location.

For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html

Change-Id: I86f50af83be699fa7e0fb064abb20324e2d87b86
2019-07-22 19:15:50 +02:00
Goutham Pacha Ravi
1709fd7fc2 [CI] Add bindep.txt
Bindep is a tool for checking the presence of binary
packages needed to use an application / library. It
started life as a way to make it easier to set up a
development environment for OpenStack projects.

Infra has been looking to drop the global
bindep_fallback.txt [1][2] file for all
OpenStack projects, they recommend that projects
maintain their own with packages as necessary.

[1] http://lists.openstack.org/pipermail/openstack-infra/2018-April/005926.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2019-June/006888.html
Change-Id: I1824f132b0ffadc6c9179582d37295f3abed355f
2019-06-24 15:03:51 -07:00
Zuul
a27034c1ac Merge "[Pylint] Bump pylint version to latest" 2019-03-13 04:12:29 +00:00
Goutham Pacha Ravi
4f559d8cc7 TrivialFix: Remove trailing whitespace in tox.ini
Was probably introduced by accident in [1]. Don't
need it anymore.

[1] I890ba4c54b0da10060767620ff5ff7e480d79a9c

Change-Id: Ib6fdb8c1488dde2308d8cc8bb3e79e1280d3e812
2019-03-08 12:19:11 -08:00
Goutham Pacha Ravi
cdf08b69ef [Pylint] Bump pylint version to latest
Older releases of pylint use  an internal API of
the astroid library that causes pylint
exceptions when parsing modules. The errors
are like:

 internal error with sending report for module ['manila/network/neutron/neutron_network_plugin.py']
 'Import' object has no attribute 'infer_name_module'

So let's use the latest version available
that doesn't have this issue.

[1] https://github.com/PyCQA/astroid/issues/649

Change-Id: I6031111e5c72470313642307b4596806cd5408df
2019-03-05 15:30:22 -08:00
Goutham Pacha Ravi
10bd807423 [pylint] Run pylint separately for code and tests
We use the mock library in our
unit tests which assigns mocked objects with
members at run time. This causes pylint to flag
"no-member" errors. We also test return values
on methods which return None explicitly, or
implicitly, this upsets pylint.

pylint is quite inflexible in the way it handles
ignores in code. We can add ignore statements all
over the test code, but that is quite infeasible.

So, this change lets us run pylint separately
for code and test modules. When running tests,
it adjusts the disabled pylint checks.

Change-Id: I85d3fe896ee95c52c3da55aedba8f4d72d0c299e
2019-03-05 21:23:55 +00:00
Zuul
ee91cc96ab Merge "Include .inc files in doc8 linting" 2019-02-21 17:07:24 +00:00
Goutham Pacha Ravi
6a6d813bb3 [pylint] Remove lint tox environment
We don't use the tools/lintstack.py
script anymore since its removal in [1],
so cleanup the unused tox environment and
the gitignore corresponding files.

TrivialFix

[1] https://review.openstack.org/#/c/609791/
Change-Id: Id2d40c1f9f1ce71a22ba9836b90c3e917171a556
2019-02-19 11:04:03 -08:00
whoami-rajat
1e07a3e694 Include .inc files in doc8 linting
This issue was recently seen in cinder when the gate failed
to detect trailing whitespaces in '.inc' files.
As seen, manila was also prone to such issues but thankfully
no error was found in '.inc' after running against doc8.
It still seems important to include it in the testing to avoid
future similar issues.

Change-Id: Ie1fd4ddb4448c05559a31098302f84367fe6ed52
2019-02-19 23:32:08 +05:30
Tom Barron
1838d51925 Fix spurious pylint import errors for ddt and mock
Set dependencies correctly for pylint job in tox.ini so
it does not report spurious E041 import errors on mock
and ddt modules.  Also fix a reference to Cinder instead
of Manila in the pylint script.

Closes-Bug: #1813156
Change-Id: Ib160caae57e41a4d45483ff4faa599143e694abc
2019-01-24 07:38:59 -05:00
Zuul
636d851437 Merge "change tox envlist from 3.5 to 3" 2018-10-17 02:05:40 +00:00
Chuck Short
4d0abb4a14 Simplify running pylint
This commit does several things:

- Setup and run pylint directly rather than running through a script.
  This allows the user to see what is happening while the user is running
  through pylint.
- Allow the user to either run pylint on a particular changeset,
  or the entire manila tree.
- Allow the user to run on a particular changeset. Using like HEAD~1,
  etc.
- I disabled the tests that were reported by pylint.
  The thought here would be go through the failures
  and correct them.
- Update pylint to 2.1.1.

Change-Id: I398d1ba01a3fd7f1c86ad4065a7984d276f33383
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-10-11 15:13:49 -04:00
Nguyen Van Trung
b5db847b26 Don't quote {posargs} in tox.ini
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')

Change-Id: I1088cfbab31befbd24e56add806d6e86fe46e5eb
2018-10-09 10:15:29 +07:00
Tom Barron
e62f1f4f9c change tox envlist from 3.5 to 3
base python version is 3, not 3.5 and
python 3.5 is not installed in some current
distros so running 'tox' locally fails.

Change-Id: Ie2449a433e07f4cafb55fe1db247ba9f854cef97
2018-10-04 14:27:39 +00:00
Tom Barron
772a64a871 Remove run_tests.sh
It is deprecated in favor of tox.

Closes-Bug: #1790470
Change-Id: If3b6a274dab0d035b9666b3b9876604cefbc2877
2018-10-04 09:55:45 -04:00
Zuul
fce517a516 Merge "fix tox python3 overrides" 2018-06-08 18:59:51 +00:00
Sean McGinnis
4c943fbcb2 Default pylint to run using python3
Updates the pylint and lint jobs to run under python3 by
changing the target python and updating the version of
pylint used.

Change-Id: Ie0ac158674fb22054b80864d33d9d7ecc82e3b36
Closes-bug: #1673824
2018-06-06 16:14:22 -05:00
Doug Hellmann
a245fd5f8f fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I59ac21cb0d34f0b6767c736d0419eb6b874efca1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 16:06:01 -04:00
liuyamin
b9aec860f0 Switch from ostestr to stestr
This change just updates the tox.ini file to call stestr directly
instead of going through ostestr.

Change-Id: Ibe957cda167b59ef44f5c7e9dfc415c227213565
2018-05-10 17:37:04 +08:00
junboli
6d82f675b8 Fix title overline too short when generate docs
when running tox -e docs locally, it failed because
the title overline too short.

Change-Id: I9b1d85f12ff559e032c465d7737e9c27efb459c3
Closes-bug: #1769073
2018-05-04 00:00:00 +08:00
Tom Barron
b08d3d5b11 Run pep8/fast8 with python3
Change-Id: I056d7228834f5becf36ccbd4f7473e532cc5a431
2018-04-07 09:20:15 -04:00
Doug Hellmann
03885b5675 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: I5f9a218429c1efc1fddae1945aef7110c4e031ee
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 15:14:44 -04:00
junboli
a60daf4f60 Follow the new PTI for document build
For compliance with the Project Testing Interface as
described in [1]:
[1] https://governance.openstack.org/tc/reference/project-testing-interface.html
For more detials information, please refer to [2]:
[2] http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I1fe5352e8e4a7703bd9908e7221f04110163d6fb
2018-01-17 09:53:00 +00:00
lijunbo
e8bca58887 Use stestr for coverage
Change [1] restored .testr.conf since it was needed for the manila
coverage job.

Modify script used by the coverage job to invoke stestr rather than
setup.py with testr so that this job no longer requires .testr.conf
so remove the dotfile and update .gitignore.
TrivialFix

[1] I451e383ed654d00a5a017cb28521c47566911f33

Change-Id: Ibf549220303395744380f79993fbfcf04b2ed5b7
Co-Authored-By: Tom Barron <tpb@dyncloud.net>
2018-01-14 13:26:53 +08:00
Raissa Sarmento
797048c5ce Remove in-tree tempest plugin
Remove in-tree tempest plugin in favor of newly
created manila-tempest-plugin repository.

Change-Id: I1fb124598f38067fee469df124ee684f748c6f57
2017-12-22 11:11:38 +00:00
zhongjun
b21c3d68a4 [policy in code] Add support for share instance export location resource
This is the basic patch which consits of the framework
code for default policy in code feature as well as
share instance export location resource.

Partial-Implements: blueprint policy-in-code
Change-Id: Iedde7a4a674a60e760b47d5eb2973f42d79226d8
2017-11-16 04:39:00 +00:00
junboli
e631ccfa81 [install-guide] remove install-guide doc
1. manila/install-guide is completely the same doc as the one in
   the directory of manila/doc/source/install, this change is to
   remove manila/install-guide because I think this is unnecessary
   and also let us maintenance a copy of install-guide doc.
2. remove install-guide in tox.ini file, cause build doc will generate
   install-guide doc.

Change-Id: Ife2d2b366f3f8b2bff8f9dda0f972858e1505a21
2017-09-13 14:38:50 +08:00
junboli
fb17422c86 Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don't put vim configuration in source files
[H203] Use assertIs(Not)None to check for None
[H904] Use ',' instead of '%', String interpolation should be
       delayed to be handled by the logging code, rather than
       being done at the point of the logging call.

Change-Id: Ie985fcf78997a86d41e40eacbb4a5ace8592a348
2017-08-03 16:13:32 +08:00
Tom Barron
85405dab29 Clean releasenotes and install-guide build dir
to ensure artefacts from previous runs are not
left over when running these document builds locally.

TrivialFix

Change-Id: I0062c1bf94490ed4e5d0eb3675226b144f7124c1
2017-06-01 17:18:48 -04:00
Tom Barron
a46649453d Add comment explaining ignore D001 for doc8
because we allow lines in excess of 79 characters in our
doc source.

Change-Id: I44fc982386f624fe44a45e97ef791a5e41ee15fd
2017-04-13 06:36:24 -04:00
Tom Barron
7dfd141915 set basepython for pylint tox env
to python2.7 so that running locally will succeed
and the results will match those for the gate
pylint job.

Partial-Bug: #1673824

Change-Id: I6c45a32ba8e77c35403357b0100379bb536a36b3
2017-03-20 15:44:39 +00:00
Tom Barron
58bd5b0179 Unblock gate failure on docs build
Our form of todo extension does not work with sphinx 1.5.2.

Remove it to unblock gate: we can add todos back in later with
more current methods.  Also clean up some dangling cross-references
in the doc.

Co-Authored-By: Valeriy Ponomaryov <vponomaryov@mirantis.com>
Change-Id: If74b9e32ad2b5d8d70da60895d85588ff993797e
2017-03-03 18:21:45 +02:00
Danny Al-Gaaf
a8ec3317be doc: verify all rst files
Make use of doc8 to verify all rst files which are not
autogenerated for errors and fail if there are any issues
found. The doc8 checks are now part of the tox 'docs'
environment and ran automatically. Checks can also be called
direcly via 'tox -e docs'.

Fix all issues found by doc8.

Closes-Bug: #1664841

Change-Id: I9215524d35646de7485504e4c5ff86fd91a1d09f
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2017-02-15 07:07:42 +01:00
Cao Xuan Hoang
ceb3c72ec7 Remove a py34 environment from tox
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: Id8a9dda9ea25b47afc35e0605f4df2f3f22c5f38
2017-02-07 13:28:28 +07:00
Tom Barron
d08713c1a3 Support python 3.5 in tox
Our current tox configuration provides no support for python 3.5
even though it is the version that ships with current ubuntu
(xenial) and Fedora (25) systems, and even though in gate the
python3 jobs run on xenial with python 3.5.

Add py35 env to tox.ini alongside py34, py27, and pep8.

TrivialFix

Change-Id: Ib32069f9185c5233c8f96164781ec66c56db33bd
2017-01-05 18:29:24 -05:00
xiaozhuangqing
82a4244eff [TrivialFix] Correct file mode settings
Drop the undesired executable bit for the following files:
  1. manila_tempest_tests/services/share/v2/json/shares_client.py
  2. manila_tempest_tests/tests/api/test_share_networks.py

Also add pep8 check for new executable files under manila_tempest_tests.

Change-Id: Iaa509fdf4e0ebeb60d71b053f62459992c938468
2016-09-28 17:02:24 +08:00
Lucky samadhiya
d82ac34d0a delete python bytecode including pyo before every test run
Change-Id: Ib1cee0ee3d482b23bbaa19956a10bb2e8fc7d559
2016-09-16 13:57:08 +05:30
Jenkins
ea9748fa4b Merge "In-tree Install Guide" 2016-08-16 08:32:34 +00:00
Goutham Pacha Ravi
33374626db Tox Upper Constraints - strip out reinstalls for remaining jobs
releasenotes and venv tox jobs had redefined the install_command
to reinstall any packages from requirements/test-requirements files.

Since Infra started supporting constrained requirements for these
jobs as well, we can drop the reinstall command.

Ref:
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: Ib4b8c6cef22a9911030c2e3e3f5281e7e22575fc
2016-08-14 11:52:05 -04:00
Goutham Pacha Ravi
dfbe3ea418 In-tree Install Guide
The OpenStack install guide team has recommended that projects
that are not part of the starter-kit:compute [1] (and a few other projects
like Cinder and Horizon) maintain their install guide in-tree. [2]

[1] http://governance.openstack.org/reference/tags/starter-kit_compute.html
[2] http://git.openstack.org/cgit/openstack/docs-specs/tree/specs/newton/project-specific-installguides.rst

Change-Id: I2b49fcfd99b3be40bb1ae7d7b8348abdb5b58b90
Co-Authored-By: Denis Cavalcante <dencaval@gmail.com>
Implements: blueprint manila-in-tree-install-guide
Partially-implements: blueprint projectspecificinstallguides
2016-08-12 08:06:38 -04:00
Daniel Gonzalez
3e86e3deac Migrate API reference into tree
The API Documentation team has requires [1] that
projects maintain their api-reference in-tree and
build it to the developer.openstack.org website.

This version of the API reference uses os-api-ref
and compiles API documentation close to that of
the OpenStack compute service (nova).

Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>

[0] http://lists.openstack.org/pipermail/openstack-dev/2016-May/093765.html

Implements: bp move-manila-api-reference-in-tree
Change-Id: I67bb3354162d6e0e00fa2788edde864cc14920ee
2016-07-25 15:55:00 +00:00
Andreas Jaeger
d2b2cc80e9 Use constraints for coverage job
OpenStack CI supports now constraints in the coverage job - as a first
job to check that the recent changes for zuul-cloner work correctly.

Use constraints for cover environment.

Change-Id: I81a985a2049221a8a7ac1f20642137f22847973f
2016-07-17 16:00:41 +02:00
Marc Koderer
829052d6dd Add tox job for db revision creation
Trivial-Fix

Change-Id: Ie87b84ddd546149ca5d9eaf2179c514071c75695
2016-07-15 05:06:25 +00:00
Matt Riedemann
0b59a910fb update min tox version to 2.0
The commands used by constraints need at least tox 2.0. Update to
reflect reality, which should help with local running of constraints
targets.

Change-Id: I27348462a21daab479d76b24b48e3a4e017504cc
2016-07-10 11:51:30 -04:00
Sean McGinnis
c9e1a1aabc Use upper-constraints in tox installs
The tox targets do not currently use upper constaints, resulting in
stable branch test runs pulling down newer library versions than what
should be supported for those releases.

This adds upper-constaints for test environment setup.

Change-Id: I1ff164242901a891fb45da03b1595b2e9246a765
Closes-bug: #1596246
2016-06-25 20:02:00 -05:00
Valeriy Ponomaryov
94cf34992c Add more dir exceptions to pep8 tox job
Manila has more dynamically created dirs than we exclude in
pep8 job. Such as 'build' and 'cover'.
Therefore, exclude them too to speed up passing of pep8 job on dev
machine where lots of dynamically created things exist.

TrivialFix

Change-Id: I256720846acdd584cadaf59e9dedaad0ff741ae3
2016-06-08 15:53:38 +03:00
Tom Barron
be01b39066 Squash E042 and E043 bashate warnings
The bashate tool has been upgraded and now issues new warnings.

Squash these E042 and E043 warnings since our shell scripts
are doing the right thing currently and changing them to avoid
the warnings makes them less readable and more fragile.

Change-Id: I25ff337160ab176bb150a6186f6c3198cc068732
2016-05-24 16:49:55 -04:00
vponomaryov
7999280fb9 Add Grenade support to Manila
Grenade is an OpenStack test harness to exercise the upgrade
process between releases. It uses DevStack to perform an initial
OpenStack install and as a reference for the final configuration.

Add support of it to Manila project, doing following changes:
- Add all required scripts for 'grenade' job, such as following:
-- settings
-- shutdown.sh
-- upgrade.sh
- Add optional 'resources.sh' script that performs functional
  tests using bash and manilaclient. List of scenarios:
-- 1. create and delete share setting metadata and access rule
-- 2. attach security service to share network
-- 3. update quotas
-- 4. create private share type and add access for project

Note following:
- Tempest is not used by design.
- Manilaclient is used of stable version - version of 'base' devstack,
  which is 'stable/mitaka'. It also means that used API microversion
  is latest for that branch.

Change-Id: I7d7e0c50933776ca1a710bcf069abb0282b821ac
Depends-On: I4232382d3c944666bbf0916a3f285b84f6ff9d64
Implements blueprint grenade
2016-04-22 12:46:37 +03:00
Tom Barron
1c2ec9b8cf Detect addition of executable files
When running pep8 checks, fail if executable
files have accidentally been added.

Co-Authored-By: Eric Harney <eharney@redhat.com>

Closes-Bug: 1566328
Change-Id: I7280c0403cd473cd4b88cfc021d4f605a7bb35f2
2016-04-08 14:28:42 +00:00