332 Commits

Author SHA1 Message Date
Jenkins
94dea10828 Merge "Python 3: fix test_attributes" 2015-07-30 15:30:01 +00:00
Jenkins
50d662d95a Merge "Create packages for quota modules" 2015-07-29 22:21:29 +00:00
Salvatore Orlando
1663f5c197 Create packages for quota modules
This patch simply renames quota modules introducing two
new packages:
1) neutron.quota
2) neutron.db.quota

This paves the way for adding more quota related modules.
Unit tests paths are changed accordingly, as well as references
to moved modules.
This patch hovewer preserves the ability of importing
neutron.db.quota_db in order to avoid breaking repositories which
use neutron as a requirement.

Change-Id: I946e87f1b2ebb3e80d64aecfe58aeff9f81896f3
Related-blueprint: better-quotas
2015-07-28 11:55:01 -07:00
Cyril Roelandt
237fa342f9 Python 3: fix test_attributes
In Python 3, strings have an __iter__ method, which makes convert_to_list fail.

Change-Id: I2411ecd31d7d05ff6f0f004180edffc76d28573b
Blueprint: neutron-python3
2015-07-28 17:12:21 +02:00
Cyril Roelandt
1f76a9061d Python 3: fix test_dhcp
In Python 3, dhcp.LOG.process is not called when calling dhcp.LOG.debug. Since
what we really want to know is whether dhcp.LOG.debug is called, tweak the test
a little.

Change-Id: I9c9d9a6162181d6e518a603193013c28e218cdee
Blueprint: neutron-python3
2015-07-28 17:02:44 +02:00
Jenkins
6b0ab7fd63 Merge "Python 3: do not index dict_values objects" 2015-07-27 21:33:36 +00:00
Jenkins
6735500d40 Merge "Python 3: fix test_context" 2015-07-27 21:33:21 +00:00
Cyril Roelandt
619ac1c91a Python 3: fix test_context
In Python 3, b'...'.startswith must be given bytes.

Change-Id: I4e83685ac6119db6f16d693df37955620271082f
Blueprint: neutron-python3
2015-07-27 16:57:08 +02:00
Ivar Lazzaro
e0ba53a09a Decompose Apic ML2 mechanism driver
As a part of the vendor decomposition effort, the
apic ML2 driver code is removed and replaced by
its version in the openstack/networking-cisco
repo.

Change-Id: Iffb5245b4c88b65afe62dd7435ee80489a654fee
Partial-implements: blueprint core-vendor-decomposition
2015-07-24 19:32:49 +00:00
Cyril Roelandt
257020a777 Python 3: do not index dict_values objects
Change-Id: I7260468b81d42415ac08ecda09973720b5b263a4
Blueprint: neutron-python3
2015-07-24 21:00:52 +02:00
Jenkins
20f099150f Merge "Add Pluggable IPAM Backend Part 2" 2015-07-24 17:18:14 +00:00
Pavel Bondar
2921f6dfa2 Add Pluggable IPAM Backend Part 2
Introduces new Pluggable IPAM backend.
IP/subnet allocation calls are sent to IPAM driver.
Calls to IPAM Driver are considered as call to third-party
environment, so if any action fails, rollback action is called.

Removes associate_neutron_subnet step from interface and reference
driver. It is not needed any more because foreign key relationship
between IPAM subnet and neutron subnet was removed.
So IPAM subnet can store id of neutron subnet,
which is not created yet.

For now only reference IPAM driver is available.

Temporarily disabled test_ipam_pluggable_backend from
gate-neutron-python34. Current patch adds executing
parts of test_db_base_plugin_v2, which is not py34 compatible yet.
Might be enabled back once 204791 is merged.

Partially-Implements: blueprint neutron-ipam

Change-Id: Ic18461cf19d2eebf8fad5535eee0eb034959800e
2015-07-24 10:31:39 +03:00
Jenkins
5ba4fa846d Merge "Python 3: fix neutron.tests.unit.agent.dhcp.test_agent" 2015-07-24 05:52:05 +00:00
Cyril Roelandt
7033960d34 Python 3: fix neutron.tests.unit.agent.dhcp.test_agent
A simple "list vs dict_keys" issue was preventing two tests from succeeding.

Change-Id: I9386ddc600005ebb1b3f5382f6e43c19d31d4213
Blueprint: neutron-python3
2015-07-23 17:37:33 +02:00
Jenkins
9d03b11837 Merge "Python 3: fix neutron.tests.unit.agent.linux.test_async_process" 2015-07-23 14:12:06 +00:00
Cyril Roelandt
3e168be46a Python 3: enable more tests
Now that Routes 2.2 has been released, we can run some tests that were
previously commented out.

Change-Id: I46d8479ae4f29dc8b26143e7a49f88ff35198e9d
Blueprint: neutron-python3
2015-07-22 15:06:16 +02:00
Jenkins
6780c304aa Merge "Python 3: fix test_provider_configuration" 2015-07-22 04:45:31 +00:00
Cyril Roelandt
6226fb73a4 Python 3: fix neutron.tests.unit.agent.linux.test_async_process
In Python 3, one cannot compare an integer to None.

Change-Id: I8de3ea3752be837540ea65f1bb254a095927de44
Blueprint: neutron-python3
2015-07-20 17:02:14 +02:00
Jenkins
486c0ee522 Merge "Use oslo_log.helpers.log_method_call" 2015-07-18 00:53:47 +00:00
Cyril Roelandt
5ed1c9115d Python 3: fix test_provider_configuration
We cannot compare a dict_keys/dict_values object with a list.

Change-Id: I6dbbe5eb4e98ccfc41109a5d93a22cda910774ee
Blueprint: neutron-python3
2015-07-17 19:39:18 +02:00
Cyril Roelandt
9976048b60 Python3: Do not compare NoneType and integers
In Python 2:
>>> None > 0
False

In Python 3:
>>> None > 0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unorderable types: NoneType() > int()

This commit does not change the behaviour of the affected code, but fixes the
TypeError that is raised in Python 3.

Some tests have been added to the py34 section of tox.ini, but are currently
commented out: these are tests that work with this patch and a fixed version of
Routes.

Change-Id: Ia00a2ad90206853f78ed93cf540bce54baab00e7
Blueprint: neutron-python3
2015-07-17 12:19:54 +02:00
Cedric Brandily
1b3c7c6ee0 Use oslo_log.helpers.log_method_call
log[1] decorator is deprecated, this change replaces it with oslo_log
log_method_call[2].

[1] neutron.common.log
[2] oslo_log.helpers.log_method_call

Change-Id: I61cf3c010e1f33a45ff700f4e8d4824ebdb378c7
2015-07-17 07:34:07 +00:00
Jenkins
fa46947198 Merge "Python 3: do not use types.ClassType" 2015-07-16 14:05:20 +00:00
Cyril Roelandt
e2fb74e196 Python 3: do not use types.ClassType
In Python 3, one should just use 'type'. Still, the use of "ClassType" does not
seem necessary here, so just fix the tests.

Change-Id: I5574926fc338110cc989bf185fa454ec26f4d530
Blueprint: neutron-python3
2015-07-16 00:58:40 +02:00
Jenkins
20947ddc55 Merge "Move pylint dep from tox.ini to test-requirements" 2015-07-15 15:03:27 +00:00
Jenkins
a34ad90ee8 Merge "Tighten exception handler for import_object" 2015-07-15 08:41:58 +00:00
Ihar Hrachyshka
5d07ec908c Tighten exception handler for import_object
oslo_utils raise ImportError if import fails. We should propagate other
failures to callers. Otherwise we may hide issues.

Also report exact failure from import_object in case L3 agent fails to
import interface_driver.

As part of the job, consolidated code to load interface driver into
common function.

Also, stopped checking for specific log messages in dhcp and l3 agent
unit tests: it's too fragile and actually not something we need a unit
test for.

Not to introduce more work for people who handle py3 porting effort,
added the unit test into the list of those that are executed for py34
job until the whole suite is ready for python3.

Change-Id: I10cdb8414c9fb4ad5cfd3f3b2630811f50ffb0c7
2015-07-14 20:30:16 +02:00
Akihiro Motoki
69ad73aaf2 Disable python3 tests failing due to Routes < 2.0
At now, global-requirements has an entry:
Routes!=2.0,!=2.1,>=1.12.3
and this leads to Routes < 2.0 which is not compatible
with Python 3. This blocks updating of global requirements [1].
To avoid the situation, this commit disables python 3 related
error due to Routes version.

Closes-Bug: #1474266
Related to blueprint neutron-python3

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

Change-Id: If5e6355505361cbefe04487b6d47ab9cc6ba861c
2015-07-14 09:02:44 +00:00
YAMAMOTO Takashi
4cd4b612c0 Python 3: Fix a TypeError in policy.py
Fix "TypeError: 'filter' object is not subscriptable" with python 3.

Blueprint: neutron-python3
Change-Id: Ia49ce2e283ecf4da5333b95006746cb19490fde4
2015-07-09 16:30:20 +09:00
Cyril Roelandt
a76090161f Python 3: do not index dict_keys objects
This cannot be done in Python 3, where dict.keys() returns an iterator. We need
to cast the result of dict.keys() to a list first.

Change-Id: I28986aefb720b4513e3eee9ba0909f79d1dc9695
Blueprint: neutron-python3
2015-07-04 17:22:35 -04:00
Jeremy Stanley
8bc09053e4 Remove unneeded OS_TEST_DBAPI_ADMIN_CONNECTION
The desired OS_TEST_DBAPI_ADMIN_CONNECTION string is now reflected
in the oslo.db 1.12.0 release's default behavior, and so does not
need to be set any longer to achieve the same opportunistic backend
discovery for tests.

Change-Id: I51e655e2db67541c58f7909811bbec344094c4c0
Depends-On: Ibcb49412a012f79be2f7fd697349ddbf43bd7b9b
2015-07-04 13:44:33 +00:00
Cyril Roelandt
1e5ef92f6a Python3: do not use urllib.urlencode
It has been moved in Python3. Use six.moves to have code that works with both
Python 2 and 3.

Change-Id: I5f286b1f784b3b7bb37852b00169a6c1227eb74b
Blueprint: neutron-python3
2015-07-02 16:32:46 +02:00
Assaf Muller
0a3279107f Move pylint dep from tox.ini to test-requirements
This allows us to pin pylint from global requirements.

Closes-Bug: #1470186
Depends-On: Ibad8cd2911efbe075ea2629c543f6ce1f216c938
Change-Id: I31cc18e0b4cd32728f5814aa9dbf403104f72c72
2015-06-30 14:58:50 -04:00
Assaf Muller
3da491cf5f Disable pylint job
Disabling pylint until it gets unbroken. Pylint 1.4.1 is using
logilab-common, which had a release on the 30th, breaking pylint.
Pylint developers are planning a logilab-common release tomorrow
which should unbreak pylint once again, at which point I'll
re-enable pylint.

Change-Id: I5d8aaab8192168946c2a0b74abc1a56848ca51a2
Related-Bug: #1470186
2015-06-30 13:22:17 -04:00
Kyle Mestery
f242b171e9 Consolidate sriov agent and driver code
In preparation for decomposing the built-in reference implementation,
this commits consolidates the sriov agent and driver code into a
coherent place for it's life in the new repository. I've also given
the unit tests a new home.

DocImpact
UpgradeImpact

Partially-Implements: blueprint reference-implementation-split
Partial-Bug: #1468433
Closes-Bug: #1427317

Change-Id: Ic8b5215de76e191030228bc28773cd6535e889d8
Signed-off-by: Kyle Mestery <mestery@mestery.com>
2015-06-26 19:51:58 +00:00
Jenkins
ca17f8485a Merge "Python3: do not use __builtin__" 2015-06-26 17:29:10 +00:00
Kyle Mestery
724c78071d Restructure agent code in preparation for decomp
This commit moves the L2 agents (Linuxbridge and OVS) into the
ML2 directory, while at the same time also moving the ML2 server
bits into toplevel directories. It also moves the configuration
files and unit tests. We also move the l2pop RPC mixin while
here as well.

DocImpact
UpgradeImpact

Partially-Implements: blueprint reference-implementation-split
Partial-Bug: #1468433
Closes-Bug: #1427317
Change-Id: If6feca7b7a6bdd6c3c6feb929fa26fb4b1f72770
Signed-off-by: Kyle Mestery <mestery@mestery.com>
2015-06-26 15:06:49 +00:00
Cedric Brandily
c48e12b781 Avoid env variable duplication in tox.ini
Some environment variables are defined multiple times in tox.ini. This
change defines "fake" tox jobs and refactors existing jobs to reduce
duplicated environment variables.

Change-Id: I0ccebea4fbfff8dda34d1ed348b96b3b8ebd59e2
2015-06-25 18:51:26 +00:00
Jeremy Stanley
d23a59f1c8 Override opportunistic database tests to PyMySQL
Set the OS_TEST_DBAPI_ADMIN_CONNECTION override variable so that
oslo.db opportunistic detection will know to use PyMySQL until
I12b32dc097a121bd43991bc38dd4d289b65e86c1 makes it the default
behavior.

This change removes previous code[1] enabling PyMySQL use.

[1] Ic5c1d12ab75443e1cc290a7447eeb4b452b4a9dd

Change-Id: Ic39feee0248f2ffabdba26f3779ab40a8f3838e6
Co-Authored-By: Victor Sergeyev <vsergeyev@mirantis.com>
Co-Authored-By: Cedric Brandily <zzelle@gmail.com>
2015-06-23 21:04:06 +02:00
Cedric Brandily
04d44cee63 Extend default setenv instead of replacing it in tox.ini
Some tox jobs[1] define their own setenv without extending/referencing
default setenv, it disallows to define environment variables shared by
all jobs. This change updates previous jobs[1] in order to extend
instead of replacing default setenv and enable global environement
variables (used in daughter change).

One remark, this change sets VIRTUAL_ENV environment variable in updated
jobs[1] but it has no effect on them.

[1] (dsvm-)functional, (dsvm-)fullstack and api jobs

Closes-Bug: #1468059
Change-Id: I99184f7375571fb8569a24ba04ae267108f5da08
2015-06-23 21:04:06 +02:00
Cyril Roelandt
0faf4a2645 Python3: do not use __builtin__
It has been replaced with builtins in Python 3. Use six.moves.builtins, since
it works with Python 2 and 3.

Change-Id: I9e1b0060a5b18116d991cafb1de085d4d084db38
Blueprint: neutron-python3
2015-06-22 16:03:51 +02:00
Jenkins
4d35f15265 Merge "Ensure tests run under python2.7" 2015-06-19 10:24:41 +00:00
Jenkins
95a3a4fcdd Merge "Put output of docs job into doc/build/html" 2015-06-18 07:12:54 +00:00
Ihar Hrachyshka
037f3111cd docs: added job to well known tox envlist
This is to make 'tox -l' return the job name in its output (needed to
allow run-docs.sh script in project-config to determine whether the job
is present, to rely on it when generating docs in gate).

Change-Id: I80eb169b7b4e5a3490586722c64394dbb724928d
2015-06-16 09:21:42 +02:00
Ihar Hrachyshka
62faedddf2 Put output of docs job into doc/build/html
This is the path where jenkins/scripts/run-docs.sh that is used by gate
to generate project documentation expects to see the output.

Change-Id: Id276fa59edb33f7789ab06055300b4dc2385472a
2015-06-15 16:26:19 +02:00
Jenkins
9c24dbeaac Merge "Actually allow to pass TRACE_FAILONLY to ostestr" 2015-06-10 17:34:43 +00:00
Jenkins
ae2c69780a Merge "Switch to os-testr to control testr" 2015-06-10 12:53:03 +00:00
Ihar Hrachyshka
eeacb95e65 Actually allow to pass TRACE_FAILONLY to ostestr
The comment below suggests to use TRACE_FAILONLY to fail quickly when
running unit tests, while tox 2.0 does not allow to pass envvars from
the cli caller unless they are explicitly mentioned in passenv=
directive.

Change-Id: I6861498e7609b0c21fad844009420ea9734e2352
2015-06-10 13:10:54 +02:00
Ihar Hrachyshka
1c124a309b Switch to os-testr to control testr
It's a nice wrapper spinned out recently from tempest-lib that should
cover all our needs that we currently fulfill with pretty_tox.sh.

Change-Id: I2268ed45ab628fe5dcab657d6287594847ab587c
2015-06-10 12:37:46 +02:00
Jenkins
0fb46a0580 Merge "Python 3: use next() instead of iterator.next()" 2015-06-10 09:13:55 +00:00