53 Commits

Author SHA1 Message Date
Michael Johnson
9ade0ff715 Updating for new sphinx docs jobs
There have been recent changes to how docs jobs are run under zuul [1].
This patch updates stable/pike to be able to run under the new zuul docs
jobs.

[1] https://review.openstack.org/#/c/508694/

(cherry picked from commit 967edebe0c4c1711aa6b566ed581bc33d51b611c)

Change-Id: I7ba3f7ea0b1e0733cec4e0cd3a05128c772e0238
2017-12-21 12:12:49 -08:00
02926d8907 Update UPPER_CONSTRAINTS_FILE for stable/pike
Change-Id: I31d2a1b7218a2f986389f0c6b3db8470dd24644b
2017-08-11 08:28:08 +00:00
Ngo Quoc Cuong
b3506fa3eb Enable H904 check
H904 allows the logging package to skip creating the formatted log
message if the message is not going to be emitted because of the
current log level.

Change-Id: Id6e27d8fefacd93bde41db21a20c8eaf3d3d6880
See: https://docs.openstack.org/oslo.i18n/latest/user/guidelines.html#adding-variables-to-log-messages
2017-07-06 04:00:49 -04:00
Michael Johnson
8987ab39ed Add RBAC enforcement to pools v2 API
This patch adds policies and enforcement to the Octavia v2 API for pools.

It also fixes a minor issue with the specs tox job.

Change-Id: Id2aa4dfad149583f9cb16205cb617f6e2a1bc92e
Partial-Bug: #1690481
2017-06-20 09:38:29 -07:00
Michael Johnson
0ce46fe8d0 Add RBAC enforcement to Octavia v2 API
This patch adds policies and enforcement to the Octavia v2 API for
load balancers and listeners.  Child patches will add the rest of the API.

In this patch I also correct some improper functional tests.

Change-Id: Id8a2d15c117c54bd45fc8bb76bf71aff1b3c8fe9
Closes-Bug: #1690481
2017-06-20 13:43:47 +03:00
Adam Harwell
49d0085f57 Add check O346 to disallow backslash line continuation
Also remove our own check that we were ignoring.

Change-Id: Icc8d74f0ee85df742340dc147b9252eaa3eaa739
2017-06-06 15:54:38 -07:00
Jenkins
3c1bfbf44b Merge "Fix the coverage HTML report" 2017-04-27 01:34:41 +00:00
German Eichberger
e07c872441 Fixes mysterious gdbm error
This patch uses the line from
https://git.openstack.org/cgit/openstack/magnum/commit/?id=20a5de74e7fb3a6e973b52e34dbba938b5e3000d
to fix the problems described in
https://bugs.launchpad.net/testrepository/+bug/1229445

Change-Id: I2f0d23e547284eb1bf671e69a262e60d91d7d81a
2017-04-24 16:37:23 -04:00
Michael Johnson
d70b1d6da0 Fix the coverage HTML report
The coverage job is only showing partial results in the HTML version
of the report.  This patch corrects that by generating an HTML report
with the combined results.

Change-Id: I66b563d8d17a982ec3701626e8ac60c52a01a363
2017-04-23 11:14:21 -07:00
Jenkins
75cdd31f88 Merge "Adjust tox cover to check for 80% coverage" 2017-04-20 14:05:21 +00:00
M V P Nitesh
e89a679965 Fix doc generation for Python3
Fix the Sphinx html_last_updated_fmt for Python3.
The html_last_updated_fmt option is interpeted as a
byte string in python3, causing Sphinx build to break.
This patch makes it utf-8 string.

Change-Id: I6cde9bb1f815bae91378772626142dd7645188d7
2017-04-19 12:48:03 +05:30
Michael Johnson
e9f52d7853 Adjust tox cover to check for 80% coverage
In preparation for adding coverage to the octavia check gate,
adjusts the cover tox job to check for 80% coverage.

Change-Id: Ifa924da594af53d07f156aa0ffbb870389dcb513
2017-04-18 15:29:59 -07:00
Ankur Gupta
dd689f3592 Introduce TESTING.rst for quick developer reference
Change-Id: Ie714d1a5d4cdf16ca3ad216b7729b8529d8038b9
2017-04-07 21:48:31 +00:00
ckji
7abcee0c80 change genconfig output-file path
Because original directory 'etc/octavia' does not exist, excuting
'tox -egenconfig' fail with 'No such file or directory'.

Change-Id: I1b26bc1e631d1280dab223b1271362100347fe82
2017-03-28 09:15:41 +08:00
Michael Johnson
7fdc8a1e06 Update for new pep8 rules E402 and W503
Change-Id: I181f396b002d0c3b89579c4fc33c34b1c099953e
2017-03-10 22:21:39 +00:00
Adam Harwell
cf9a8c8f77 Look for diskimage-builder not dib-utils when building amps
Also ignore E402 and W503 pep8 issues

Change-Id: I7937d0a21c7a748cd682511bd429de8cf0ffe498
2017-03-09 02:30:39 +00:00
Jenkins
d5e72bcef8 Merge "Remove python3.4 from tox" 2017-02-14 17:33:13 +00:00
johnsom
5b72c134a9 Create api-ref base for Octavia
This patch will create the initial directory and index for the api reference
documentation (using the new guidelines) for the Octavia API.

Change-Id: Id5fbe569acfe7348f4f9dfc9cbef49834ea824c3
Partial-Bug: #1558385
2017-02-13 23:08:14 +00:00
Michael Johnson
e251016191 Remove python3.4 from tox
The Consistent Testing Interface (CTI) [1] does not list python3.4
testing as needed for OpenStack Python 3 support.  This patch removes
the unnecessary Python 3.4 tests from our tox configuration.

[1] https://governance.openstack.org/tc/reference/cti/python_cti.html

Change-Id: I4d9b72f7ad83c4d41ce364a1d0253c358537e64c
2017-01-24 14:16:00 -08:00
Gary Kotton
4edcf3a8df Add context to unit tests
When running the unit tests we will now see which tests is being
run and the status of the test in question. This will help debugging,
triaging and cleaning things up.

Change-Id: I6d1458654d2fb6a8e814b17c4673bb9337fac4ec
2017-01-01 01:50:56 -08:00
Michael Johnson
ad828709a7 Setup translation for octavia
This patch sets up octavia for translations.
It also includes some additional pep8 tests borrowed from neutron
that will be used in the future (tempest idempotent ids and policy.json)

Change-Id: Ia70506fa8cfdbcea7cc67b940761365093e94f2b
2016-12-15 00:48:02 +00:00
Michael Johnson
7d3a0f3670 Fix to run functional tests
After the scenario test merge [1] our functional tests were no longer
being run by the py* tests.  This patch adds a functional test
environment and updates the cover environment to include the
functional test coverage.

[1] https://review.openstack.org/172199

Change-Id: If6b1de66ed441e0c05cc8daf640b6e713d7e0708
Closes-Bug: #1630012
2016-10-11 17:51:08 +00:00
ptoohill1
5e774f373a Octavia: Basic LoadBalancer Scenario Test
TESTING: Devstack plugin changes to run scenarios

Adds: Structure for tempest testing
Adds: Required tempest files and configuration for tempest testing
Adds: Octavia clients for communication with the API
Adds: Utilities for tempest testing
Adds: Mock session in method test_update_health_no_status_change of test_update_db

Co-Authored-By: Franklin Naval <franklin.naval@gmail.com>
Co-Authored-By: Madhusudhan Kandadai <madhusudhan.openstack@gmail.com>
Co-Authored-By: min wang <swiftwangster@gmail.com>

Change-Id: Ifd821ad0d94131e7dc42f2a52746ec094cf4153e
2016-09-23 22:50:05 +00:00
Stephen Balukoff
26ab83e9aa Add tox 'specs' test to pep8 environment
It turns out the gate doesn't actually use tox for the docs test,
so in order to catch errors in specs, this commit moves the tox
specs testing to the pep8 environment, where the gate actually does
use tox for the test.

Change-Id: I660d360eed5b109c85d7ba73d421d3973c96c452
2016-09-09 11:10:30 -07:00
Paul Glass
e291a88210 Stop using bandit-baseline
bandit-baseline finds *new* issues introduced in a commit, by comparing
results between two git commits. If the git repository has uncommitted
changes, bandit-baseline refuses to run.

This switches over to using plain bandit instead of bandit-baseline,
and resolves or stifles existing bandit errors so we have a clean run.
These updates apply to bandit running as part of `tox -e pep8` or `tox
-e bandit`.

* Have bandit runs from tox ignore the octavia/tests directory
* Resolve several instances of `B701 jinja2_autoescape_false`
* Stifle several instances of `B303 md5`
* Resolve two instances of `B104 hardcoded_bind_all_interfaces`
* Stifle one instance of `B104 hardcoded_bind_all_interfaces` (see
https://bugs.launchpad.net/octavia/+bug/1489963)

Closes-Bug: #1621251
Related-Bug: #1489963

Change-Id: Iad3cbe5762949a6311bdd361b1f12c5a24c40633
2016-09-09 14:50:20 +00:00
Stephen Balukoff
0a4764f7b7 Update tox 'docs' environment to test specs
This commit updates the tox 'docs' environment to also run our specs
tests, so that the existing docs gate merge jobs will catch any specs
that get added but don't follow the template.

This commit also updates the specs test to suppress warnings for
:doc: references in specs.

Change-Id: Ie7dda124a0c964712b1a02b55730a76fa346111e
Closes-Bug: #1621648
2016-09-08 15:18:43 -07:00
Andreas Jaeger
d7146de5e8 Move bandit to pep8
The bandit gate is passing, let's make it voting.

Since bandit is a security linter, add it to the linter target - called
pep8 - and run it there. This will save the CI systems spawning an extra
test machine for this.

This is the recommended approach in OpenStack CI to run all linters as
part of pep8 target - see also the consistent testing interface for
python (http://governance.openstack.org/reference/cti/python_cti.html)
that associates pep8 with "Codestyle checks".

Change-Id: Id65a50c35723b79e9b92952d138e60ee998c341c
2016-09-02 17:45:44 +02:00
AvnishPal
13f2b1ede1 Use upper constraints for all jobs in tox.ini
Openstack infra now supports upper constraints for
all jobs. Updated tox.ini to use upper constraints
for all jobs.

Change-Id: I1f31ac2761e793a7831676de520de08497e2fb95
Closes-Bug: #1614361
2016-08-23 09:24:16 +05:30
Michael Johnson
bc2e9beb3a Adds a process to generate key flow documentation
Octavia extensively uses TaskFlow flows for orchestration.
To make it easier for developers to understand these flows,
this patch adds a mechanism for generating graphviz representations
of the key Octavia TaskFlow flows.
It also updates our tox docs task to generate this documentation.

This patch depends on a fix to the TaskFlow export_to_dot method.

Added into conf.py as first step of configuration

Closes-Bug: #1561063
Change-Id: I914e1c062b400148565def37ccf618b3d2ea2573
Depends-On: I99f87af0b2bed959fcb43ef611b3186e23bd9549
2016-08-10 21:39:38 +00:00
Henry Gessau
bd9d7a02b4 Enable DeprecationWarning in test environments
Many deprecations are triggered early (on imports, for example)
before the warnings are enabled by the WarningsFixture in the
base test class.

To make sure all DeprecationWarning messages are emitted we enable
them via the PYTHONWARNINGS environment variable.

Change-Id: Iaa71926035889763ee733fe64ea2336d326faa5f
2016-08-09 19:00:22 -04:00
Yatin Kumbhare
db2178964a Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: I968c8baab6b9f5c1b1b99735e16dc08158f7d8d7
2016-07-12 21:12:59 +05:30
Gary Kotton
18b2f02676 Tox: Remove exclude directories that no longer exist
Remove directories that no longer exist in the project,
for example openstack/common. This is now part of libraries
that are imported.

TrivialFix

Change-Id: I5e8abb022686c581e5faa8063b7497582122cc3e
2016-06-06 06:15:47 -07:00
Ihar Hrachyshka
acbf4f9a1d Use upper-constraints.txt file for all tox targets
The only targets that are left unconstrained are those that belong to
post merge queues where constraints are not yet available.

Change-Id: I0546be87a0bb2a34b8c030d883ede3c45e6d6f54
2016-06-01 19:08:53 +00:00
Grant Murphy
61a9894527 Add bandit baseline to tox
Bandit baseline will check the last commit to see if
it introduced any new security problems.

Details of how bandit can be configured for the gate are
documented here:

https://wiki.openstack.org/wiki/Security/Projects/Bandit#Gate_Testing_with_Bandit

Change-Id: I791d897c4efe00bc4c0fd3b9d249e561eeb82acb
Partial-Bug: #1552002
2016-03-03 22:42:15 +00:00
Chaozhe.Chen
0e0b77b4d8 Update flake8 exclude
Enable pep8 to check files in tools.
Remove the exclusion of non-existent directories.

Change-Id: I4925a36f63065077431c34d349285ad5f7fa75d4
2016-02-21 01:34:34 +08:00
caoyue
90dc020297 Add debug testenv in tox
Once we add debug testenv, we can use "tox -e debug -- --debug"
to debug test cases when tox is running.

Change-Id: Ic0635f2b99c166c77757277e8273f42cdb17ce73
2016-01-13 14:04:13 +08:00
Kenji Yasui
4c9e5aa224 Fix db error when running python34 Unit tests
If tests for py27 is executed before py34 tests, then
there is a chance that py34 related tests may fail.
The following patch fixes it.

Ref: https://review.openstack.org/#/q/status:merged++topic:bug/1489059,n,z

TrivialFix

Change-Id: I99dd7a67829bbf9115e011373ce43d8e893e5c66
Closes-bug: #1489059
2015-12-07 04:16:26 +00:00
Kyle Mestery
8c741ba383 Add reno for release notes management
Change-Id: I963992cc0278d38ecae506d597072e8eb8b45e13
Signed-off-by: Kyle Mestery <mestery@mestery.com>
2015-12-04 14:42:32 -06:00
Michael Johnson
4f44ef2f1f Add a missing tox environment "venv"
The venv tox enviroment is required for the package release
to pypi.

Change-Id: I5b6fda3b3efc86dd2fdb7b7d98fb39c14708f89b
2015-09-30 16:33:07 +00:00
Stephen Balukoff
943da7d9af Move roadmap to wiki
Since the roadmap is usually one of the first documents
that people curious about Octavia are likely to read, it makes
sense to move this to somewhere both more easily found by new
people, and more quickly updated by project leadership. As such,
this commit removes the ROADMAP.rst file from this repo, and
moves it to: https://wiki.openstack.org/wiki/Octavia/Roadmap

Change-Id: Ibce2191fbfb33c09af0f9ae0d839e1fabcf788b5
2015-09-15 20:19:26 -07:00
Bertrand Lallau
c4dd8b89fd Enable automatic sample config generation
- Added an entry_point for oslo config generator
- Added a script to enumerate config options
- Added a tox target to invoke config generator

Change-Id: Ibc66efd103e790a73ef6389817e099ede65d4f32
2015-08-28 11:29:19 +02:00
Adam Harwell
e6de970a38 Adding Python 3.4 Compatibility and Tox Check
Change-Id: I2a2ec83baa13f4433e32c180d7a057553348a906
2015-06-23 18:18:17 +00:00
Brandon Logan
a48ccb03fb Fix ups so pbr and setup works
Moved octavia/bin directory to octavia/octavia/cmd and renamed octavia-api to
api.py.  This follows the new strucutre most openstack projects are doing.
Also implemented octavia-api being built when doing setup install.

Had to remove the octavia/tests/specs symlink because pbr did not like it and
would not allow anything to be built. Also found out the test_titles test was
not being run on the specs, so that has been added as a separate tox
environment.

Change-Id: I92f2bc6eaa346983f7a2479dc9fa43d2040f2cd5
2015-04-23 16:04:27 -05:00
Adam Harwell
28c7eacab2 Fix stale pyc issue for unit tests
See the following for more info:
* http://lists.openstack.org/pipermail/openstack-dev/2014-September/045845.html
* http://lists.openstack.org/pipermail/openstack-dev/2014-September/045873.html
* https://review.openstack.org/#/c/121044/

Change-Id: I98161082cd72b92a7af44f8be8b5a92328a72281
2015-03-31 11:18:31 -05:00
Kiall Mac Innes
278a39ecf7 Add tox -ecover environment
Change-Id: Ifb07bb6e7240d8d8a116baa17cb89ced647c128b
2015-03-27 16:12:38 +00:00
Doug Wiegley
37630493f5 Tweak requirements to be compatible with global-requirements
Change-Id: Ife81d109b61d3c24a594e7f6e582e064f161140f
2015-02-16 12:34:40 -07:00
Alex Barclay
968904ae48 Initial amphora status daemon
Initial status daemon. What's done:
sends udp to both ipv4 and ipv6
calculates hmac
has config file in json
initial command line arg parsing
a few unit tests

Not done:
config file changes
signal support
communication from API on amphora

Serious work in progress

Change-Id: I1e7759335ac43364d27e3176cf813c4f6ef549cb
2014-12-18 22:53:10 -08:00
Jenkins
5d7e1ef9ca Merge "Oslo incubator updates" 2014-12-02 19:06:26 +00:00
Doug Wiegley
941c302757 Oslo incubator updates
Change-Id: I9559d8a6d59477f6b5ba3f82ab9ecf9b71b75f70
2014-12-02 12:00:34 -07:00
Doug Wiegley
bf3ef92106 Remove python 2.6 from tox env list
Change-Id: I694034b6d6964cb8301ac3b970c40f21e0822ed8
2014-12-01 21:37:02 -07:00