Commit Graph

156 Commits

Author SHA1 Message Date
Ryan Tidwell
fc2dae7c93
Enable MP-BGP capabilities in Ryu BGP driver
This change enables all capabilties regardless of peer address
family, thereby enabling announcement of IPv6 prefixes over IPv4
sessions and vice-versa. Peers can opt in/out with capabilities
configured on the remote end of the session.

Change-Id: I7b241cdfddcecbdd8cdde2e88de35b9be6982451
Closes-Bug: #1784590
2019-02-28 08:20:39 -06:00
Boden R
51986c5f75 stop using common db mixin methods
All of the methods of common db mixin are available via neutron-lib
and the mixin will be removed before long.
This patch switches the code over to use neutron-lib's APIs rather
than those of the mixin.

This commit also includes the following unrelated change
to pass the gate.
----------------------------------------
tox.ini: Remove symbolic links to fix issues in py3 jobs

2019-02-11 21:38:47.092425 | ubuntu-xenial | py35 runtests: commands[1] | find . -type d -name __pycache__ -delete
2019-02-11 21:38:47.093110 | ubuntu-xenial | setting PATH=/home/zuul/src/git.openstack.org/openstack/neutron-dynamic-routing/.tox/py35/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
2019-02-11 21:38:47.097926 | ubuntu-xenial |   /home/zuul/src/git.openstack.org/openstack/neutron-dynamic-routing$ /usr/bin/find . -type d -name __pycache__ -delete
2019-02-11 21:38:47.101454 | ubuntu-xenial | /usr/bin/find: cannot delete ‘./.tox/py35/lib/python3.5/plat-x86_64-linux-gnu/__pycache__’: Directory not empty
2019-02-11 21:38:47.101813 | ubuntu-xenial | /usr/bin/find: cannot delete ‘./.tox/py35/lib/python3.5/collections/__pycache__’: Directory not empty
2019-02-11 21:38:47.102118 | ubuntu-xenial | /usr/bin/find: cannot delete ‘./.tox/py35/lib/python3.5/encodings/__pycache__’: Directory not empty
2019-02-11 21:38:47.304506 | ubuntu-xenial | /usr/bin/find: cannot delete ‘./.tox/py35/lib/python3.5/importlib/__pycache__’: Directory not empty
2019-02-11 21:38:47.309574 | ubuntu-xenial | ERROR: InvocationError for command '/usr/bin/find . -type d -name __pycache__ -delete' (exited with code 1)
----------------------------------------

Change-Id: If4fa99d98e9507d9fefa84cd39d7d1d3381801a0
2019-02-20 11:51:04 +09:00
Boden R
19aed83ff1
Fix gate issues on master
We recently removed nenutron.common.rpc [1] as the rpc module lives in
neutron-lib now. This project was missed because I didn't find
neutron.common.rpc as an import. This patch switches rpc uses over to
neutron-lib.

This also addresses an issue where toxenv fails when it encounters a
non-empty __pycache__ directory. This adjusts the options passed to
find so that it is tolerant of this scenario and allows tox runs to
proceed.

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

Change-Id: Ice83f7574f146436e3db045693b530f0cfeda049
2019-02-13 14:31:31 -06:00
Zuul
571e2e3f0e Merge "Add agent_updated to BgpDrAgentNotifyApi notifier" 2019-01-17 11:50:48 +00:00
Zuul
a997500d07 Merge "Improve patching of sys.argv" 2019-01-15 13:42:02 +00:00
Tobias Urdin
a861327795 Add agent_updated to BgpDrAgentNotifyApi notifier
When a bgp-dragent is deployed with enable_new_services
set to False so that the agent is disabled upon creation
the first attempt to enable it again throws an error but
the second time works, see the bug report.

Change-Id: If77e2035d0c12d0391ab9c38054bf2e0d24dac4a
Closes-Bug: 1799455
2019-01-11 14:54:00 +01:00
Zuul
b78874f172 Merge "Convert policy.json into policy-in-code" 2018-12-27 17:19:16 +00:00
Akihiro Motoki
1241f9b603 Convert policy.json into policy-in-code
This commit converts the existing neutron-dynamic-routing policy.json
into policy-in-code.

Partially Implements: blueprint neutron-policy-in-code

Change-Id: I4f99739ca8b979ddf69c52c3f1b36e320326db8d
2018-12-18 21:28:51 +00:00
Ryan Tidwell
34655a8e6e
Migrate neutron-dynamic-routing from Ryu to os-ken
This change causes neutron-dynamic-routing to stop consuming Ryu
in favor of os-ken. os-ken becomes the reference implementation
for BGP services and neutron-dynamic-routing no longer has a
dependency on Ryu.

Partially-Implements: blueprint ryu-framework-maintenace-transition
Change-Id: I4a68440809cad5de2d6d191f7211d68b542672e5
2018-12-18 14:03:13 -06:00
Boden R
266246fd84 use common rpc and exceptions from neutron-lib
The neutron.common.rpc and exceptions were rehomed into neutron-lib and
are currently shimmed in neutron [1]

This patch consumes those modules from neutron-lib by using lib's
modules rather than neutrons.

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

Change-Id: Ic95e9ab17fa6ba3b12cea7837322f113d0084aeb
2018-12-10 06:27:26 -07:00
Zuul
b1d4b8baa6 Merge "use context manager from neutron-lib" 2018-12-08 05:33:16 +00:00
Zuul
66e13d17e7 Merge "use neutron-lib for _model_query" 2018-12-08 05:19:03 +00:00
Boden R
367201cb00 load neutron objects using neutron-lib
To access neutron objects we're moving to a dynamic plugin approach as
shown in the depends on and related patches.

This patch removes the imports of neutron.objects and uses neutron-lib
to load them instead.

Change-Id: I63bf23a6c116388dd038cfb4b75721f314997bca
2018-12-03 13:34:36 -07:00
Boden R
8170e51adb use neutron-lib for _model_query
The model_query module is in neutron-lib and the CommonDBMixin will
eventually be removed. This patch swiches use of the _model_query
method over to query_with_hooks from neutron-lib.

This patch also bumps the neutron-lib version up to 1.20.0

Change-Id: I3f2711239772a41ccb6a0d7eb19f11326f125e86
2018-12-03 13:30:21 -07:00
Boden R
155f66337c use context manager from neutron-lib
Access to neutron.db.api's context manager is already in neutron-lib
and in fact neutron is already using it as a shim. This patch switches
over context manager access to use neutron-lib's accessors.
Also see https://review.openstack.org/#/c/613122

Change-Id: Id07fb7da50f80a3434c6bf790ffddf2bb25a6796
2018-12-03 13:29:08 -07:00
YAMAMOTO Takashi
7f82a19155 Remove unnecessary mocking of get_admin_context
Because:
- They are not necessary.
- Neutron agent scheduler code (reschedule_resources_from_down_agents)
  seems to (correctly) assume each get_admin_context() call returns
  a fresh context.  This mocking breaks it.
- Right now, Neutron agentdb uses the new engine facade [1] and
  Neutron agent scheduler doesn't. It causes caching issue in our
  unit tests. (See the Related-Bug)  Stopping reusing contexts
  (thus sessions) would prevent the issue.

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

Related-Bug: #1803745
Change-Id: Ia986f98f8bda9c7cde33af3dfdf2e45a2685fd6d
2018-11-28 19:54:50 +09:00
Zuul
17e823e33a Merge "Move 4byte_asn scenario test to basic dir" 2018-11-01 06:06:28 +00:00
Chuck Short
de57190bca Fix unit tests with py3.6
In python3.6 the path used by os.path.join can be either
a string or bytes, so mock the neutron.common.config.init
to return a string so the tests pass with python3.6.

Change-Id: I10b399edb76b2ed3a2a235f9f4ec278ef94c4251
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-09-22 13:09:43 +02:00
James Page
bd61eadba2 Improve patching of sys.argv
More in-depth type checking of args in Python 3.6 causes issues
with the current approach to patching sys.argv for agent unit
tests;  Directly patch argv with the required test arguments
rather than using return_value (which does not really do what
the test assumes it does).

Change-Id: I8966323e3f0853351fe27207ae63901c2f9f351a
2018-06-15 14:26:11 +01:00
Federico Ressi
26bfa08b23 Disable subnet CIDR reservation
Reserving subnet CIDR make impossible to reuse the same
CIDR for a subnet twice for the test case class.

Change-Id: Ia32f0e3fea509d1eb0074f5d4bdaf5b02b6dcae0
Depends-On: I421dd28999086ee0af9246121f4f033291e341b4
Closes-Bug: #1766702
2018-05-11 07:13:55 +02:00
Boden R
78d68a18ba use rpc Connection rather than create_connection
The create_connection function in neutron.common.rpc is just an alias to
Connection. This patch switches to the later so we can remove the former
in: https://review.openstack.org/#/c/560130

Change-Id: Ie8eaca442fa2872fe061f997898d9cd7d9195c9d
2018-04-12 14:03:01 -06:00
Gary Kotton
4692ac30ec Fix pep8 issues with import order
TrivialFix to unblock gate.

Change-Id: Iba94d636907215091e6193824f67bae1a731c463
2018-04-12 04:39:13 -07:00
Zuul
0e61c281c0 Merge "Enable mutable config in Neutron-dynamic-routing" 2018-04-09 20:50:09 +00:00
Sławek Kapłoński
dcba0d29c4 Enable mutable config in Neutron-dynamic-routing
New releases of oslo.config support a 'mutable' parameter to Opts.
This is only respected when the new method mutate_config_files is
called instead of reload_config_files. Neutron-dynamic-routing
delegates making this call to oslo.service.
This was provided in patchset
Icec3e664f3fe72614e373b2938e8dee53cf8bc5e

Further patches will be needed to make select config options be
marked as mutable. This change enables support for oslo provided
config options to be updated via SIGHUP such as log level.

Change-Id: Icb405ae7197af7507469593e8555b833186c0e68
Task: 12505
Story: 2001545
2018-04-06 13:12:22 +02:00
Thomas Morin
3192147009 remove unused plugin.get_plugin_name()
This method does not seem to be used anymore:

http://codesearch.openstack.org/?q=get_plugin_name&i=nope&files=&repos=neutron,neutron-lib

Change-Id: Iccb492f7dd81686f43db0be5389052d1a1833f09
2018-03-29 11:59:40 +02:00
Zuul
008517ea02 Merge "Switch to neutron-tempest-plugin for tempest tests" 2018-03-26 22:03:45 +00:00
Jens Harbott
4808c72a39 Move 4byte_asn scenario test to basic dir
Since a separate job has not been created [0], move the scenario test
into the basic directory so that it will be executed there.

Set TEMPEST_CONCURRENCY=1 for the basic scenario job in order to avoid
resource collisions.

[0] https://review.openstack.org/529256

Change-Id: Idbf2739a585473fdf1d364ad1ee263ad359fd750
2018-03-26 07:12:45 +00:00
Zuul
0c727cd4ba Merge "Fix failure when adding a speaker to an agent" 2018-03-22 06:39:11 +00:00
Zuul
b8e9ba662d Merge "Fix TypeError for BgpSpeakerRescheduleError" 2018-03-11 08:46:34 +00:00
YAMAMOTO Takashi
39d9d0de9e Fix TypeError for BgpSpeakerRescheduleError
Inherit Conflicts to be consistent with RouterReschedulingFailed.

Closes-Bug: #1738983
Change-Id: If2d6151c161d1b0848ecb28bdb823676249e1221
2018-03-06 19:16:22 +09:00
Boden R
ee37a36894 use common agent topics from neutron-lib
The neutron.common.topics module was rehomed into neutron-lib with
commit Ie88b84949cbd55a4e7ad06341aab77b286cdc485
This patch consumes it by using neutron-lib's version of the module in
prep for Ia4a4604c259ce862597de80c6deeb3d408bf0e95

Change-Id: I71a90ca62a664a9bab2e7b151f0cce7eeab8ff41
2018-03-01 07:33:30 -07:00
Jens Harbott
fd497a491a Fix failure when adding a speaker to an agent
When get_bgp_speaker_with_advertised_routes() collects the data for BGP
peers, it needs to include the auth_type field, otherwise adding the
speaker to an agent will fail.

Change-Id: I668397be4a531ba5c0628eb23df9a84d0de8c28c
Closes-Bug: 1750121
2018-02-20 11:01:30 +00:00
Zuul
c7849e1434 Merge "Fix unit tests for floating IP creation" 2018-02-15 10:18:49 +00:00
Zuul
f9d6f91652 Merge "Tag the alembic migration revisions for Queens" 2018-02-15 10:16:45 +00:00
Zuul
bdcb601da5 Merge "The description of the range for local_as and remote_as is incorrect in file "base.py"" 2018-02-13 14:49:40 +00:00
Gary Kotton
9a6fcb6205 Fix unit tests for floating IP creation
Remove unnecessary settings of None in the floating IP
creation.

This is now dealt correctly with by neutron.

Change-Id: Ifa7195bc0c58eca077579039705bb1738f3d362e
2018-02-11 09:29:52 +00:00
Gary Kotton
cc7f704848 Tag the alembic migration revisions for Queens
This allows the database to be upgraded with the command:
  neutron-db-manage upgrade queens

Change-Id: Ia33058ec98e76204dd96060c80299a837cc46fce
2018-02-09 07:12:42 +02:00
Gary Kotton
3562fb4305 Fix broken unit tests
DB validations need to make sure that the value is True or False.
'0' was causing the unit tests to fail.

Change-Id: I0af74c88ce4c4e9d117ea5ff3394eec5be27ecf7
2018-02-08 22:44:30 +02:00
zhaojingjing0067370
0d8ab06004 The description of the range for local_as and remote_as is incorrect in file "base.py"
The range for local_as and remote_as  has been  modified for [MIN_ASNUM,MAX_4BYTE_ASNUM],
so the description of the range should be modified in file "base.py".

Change-Id: Id37af6c571f7fb028c315c61ffffee0fc0482362
2018-01-25 15:56:40 +08:00
Chandan Kumar
ad52025727 Switch to neutron-tempest-plugin for tempest tests
* https://review.openstack.org/519310 syncs the code from neutron
  project to neutron-tempest-plugin repo and it is better to
  depend on new one in order to avoid the breakage.

Depends-On: I9962fd5aa9a13f315208255e2cc5f599871a6f53
Change-Id: I34efe893b93240c4689de1dda978209926022dfd
2018-01-24 10:16:27 +00:00
Gary Kotton
db343c12b1 Address breakage from upstream change
Commit 088e317cd2dd8488feb29a4fa6600227d1810479 broke the plugin.
This addresses that change.

Change-Id: Ie7118a089e2c3fe058f90bd8d1e5a979ed9bf105
2017-12-17 01:17:25 -08:00
Boden R
1f46de716d use l3 api def from neutron-lib
Commit I81748aa0e48b1275df3e1ea41b1d36a117d0097d added the l3 extension
API definition to neutron-lib, commit
I2324a3a02789c798248cab41c278a2d9981d24be rehomed the l3 exceptions and
Ifd79eb1a92853e49bd4ef028e7a7bd89811c6957 shims the l3 exceptions in
neutron.

This patch consumes the l3 API definition from neutron-lib
in prep for If2e66e06b83e15ee2851ea2bc3b64ad366e675dd

Change-Id: Ie5f87829ce55fed290bce4be933b9e2b0615be46
2017-11-28 06:33:35 -07:00
YAMAMOTO Takashi
78ae7cb8f5 Update after agent extension rehome
After the recent Neutron change. [1]

[1] I18aebec1e2b5b361d9b96192d4a59e5424c6a80b

Closes-Bug: #1734265
Change-Id: I2d4624013e0df9670b17d73a89d17f8e2b5bdb0a
2017-11-24 18:08:58 +09:00
Nguyen Phuong An
39699184d8 Use agent OVO for bgp_dragent_scheduler
Neutron agent scheduler has been switched to use Agent OVO[1].
So this patch uses agent OVO for bgp_dragent_scheduler.

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

Change-Id: I7e5da95ab3c28c00f3be9eca2c92a772492cfa69
Closes-Bug: #1732603
2017-11-16 16:35:59 +07:00
Hirofumi Ichihara
972756f603 Support 4-Byte AS Numbers
Now neutron_dynamic_routing supports 2 byte AS numbers only.
This patch expands AS numbers constraint so that it supports
4 byte AS numbers. It expects that operators use asplain
notation to set AS numbers[1]. That's backward compatible with
existing 2 byte AS numbers.

[1]: https://tools.ietf.org/html/rfc5396

Change-Id: I06ae0c42d983e88e1f38c501d5c85a7956f195ad
Closes-Bug: #1573092
2017-11-06 09:39:34 +00:00
Armando Migliaccio
c576ffd48d Use FAULT_MAP from neutron-lib
According to Ib051555ea8496ed7eec8ed30733c964012e31c32

Change-Id: Icc92e767d1d60e235a152490864ea4cd14c3ad53
2017-11-04 16:28:31 -07:00
Adit Sarfaty
229beac198 use external net api def from lib
The external network extension's API definition was rehomed into
neutron-lib with I9933b91d1e82db3891b3b72f06e94316e56a4f15 and
broke our unittests.

Change-Id: Ib184871ac7ec5cd09cfb26d911cec8d9ae6fca7e
2017-11-02 10:09:06 +02:00
fumihiko kakuma
24625be6c5 Fix unmatched argument
add_agent_status_check_worker() does not pass context to
schedule_all_unscheduled_bgp_speakers()

Change-Id: Ib48decfc3d15cb23625d744026a3af0ee0c84446
2017-10-23 20:27:06 +00:00
fumihiko kakuma
e71d151668 Use common constants in neutron-lib
AGENT_REVIVED has been moved from neutron.common.constants
into neutron-lib.

Change-Id: I5f7fc42a5d9c2e0246d6274223247c6efd5e67e5
2017-10-23 10:48:00 +09:00
Hirofumi Ichihara
95d2bdfde1 Switch to tempest.common.utils.is_extension_enabled
The tempest.test.is_extension_enabled() has moved to
tempest.common.utils.is_extension_enabled() in Pike.

Change-Id: I8fb12f913f187e4f0208438e7f39b2691f0dd4f3
2017-10-04 08:02:00 +00:00