This patch removes all use of common_db_mixin. All methods of that
class are available in some form from neutron-lib and we are removing
the mixing from neutron soon.
Change-Id: I80d17a491d4468a94f4ae184f1b453f41cdf92a2
This change adds DVR-aware announcements for routable fixed IP's
to be sent, thereby routing traffic directly to the appropriate
compute node instead of the centralized router on the network node.
Change-Id: I3aecdd7979dba97dab12a6550655c90a57f56cb3
Partial-Bug: #1775250
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
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
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
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
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
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
If a bgp speaker is binded to a down dr-agent, unbind and reschedule it.
If there is an unbinded bgp speaker, schedule it.
Change-Id: If5de81f1ca9b7781f48fd9bea84848f4261ccbe6
If "fields" vaule is not "None" in the function
"get_bgp_peers_by_bgp_speaker", this value should
be put into the called function "self._make_bgp_peer_dict(x)".
Change-Id: Icfb50a4ae59f3008c81bd39bd16c8827841b33d7
This executes the dr scheduler on the callback for create_bgp_speaker.
Also add the following variable for devstack.
BGP_SCHEDULER_DRIVER: specify dr scheduler driver
Change-Id: Ibf94cc2183783f9bdb2dd245ad28d304ca930589
Some DB models were relocated and their deprecated import paths were
cleaned up[1].
[1] Iadbf44d52ee8e30712807384152a29ce1a8b8f72
Change-Id: I58972e3465ed9e3b7d8cdd24abc463d55ce1b7d5
When a dvr floating IP is associated to a port, the bgp plugin
`floatingip_update_callback` will immediately send a notification
`start_route_advertisements` to DR agent, there is a new floating
IP bgp route.
But this bgp route is not correct, its next_hop is set to dvr router
snat gateway IP address. And then after `periodic_interval` seconds,
the DR agent will resync that DVR fip route with new next_hop to the
correct FIP namespace fg-device IP address.
This patch will let the bgp_plugin to handle the floating IP bgp route
next_hop query.
Change-Id: Ic6bb7f4263c6e2da315178be2ed041eb7020c905
Closes-bug: #1615919
The following _MAX_LEN constants are being removed from
neutron/api/v2/attributes.py in [1]. The corresponding DB field size
constants from neutron_lib.db.constants should be used instead.
NAME_MAX_LEN --> NAME_FIELD_SIZE
TENANT_ID_MAX_LEN --> PROJECT_ID_FIELD_SIZE
DESCRIPTION_MAX_LEN --> DESCRIPTION_FIELD_SIZE
LONG_DESCRIPTION_MAX_LEN --> LONG_DESCRIPTION_FIELD_SIZE
DEVICE_ID_MAX_LEN --> DEVICE_ID_FIELD_SIZE
DEVICE_OWNER_MAX_LEN --> DEVICE_NAME_FIELD_SIZE
In alembic migration scripts, the raw numerical value shall be used.
For more information, see [2].
[1] https://review.openstack.org/399891
[2] http://lists.openstack.org/pipermail/openstack-dev/2016-October/105789.html
Change-Id: I038d6d32eefa57c5fc57b870a33d09bef1db296c
This allows the database to be upgraded with the command:
neutron-db-manage upgrade newton
Migration f399fa0f5f25 is the newton milestone for the expand
branch. It was tagged earlier (although it shouldn't have been).
Migration 61cc795e43e8 was erroneously tagged, so remove the
tag from there.
Also clean up a deprecated use of model_base because the
deprecation warning was cluttering up the output of
neutron-db-manage.
Depends-On: I5b9c02814bdc1945422184a84c49f9e67dcf24a9
Partial-Bug: #1623108
Change-Id: If1820978c1eb6a8c2dbff20b349c0d4108a49258
This will fix the issue of KeyError being thrown when
'password' is not supplied while updating bgp peer.
The dict get() method is used to return None when
'password' key is not available.
Two unit tests are also added which will test the cases
1) Exception thrown if the auth type is 'none', and a
password is supplied when updating
2) When the password is not supplied
Change-Id: Ief9e88ca12b04eb08b0cc4e60f9d883f1e282ae9
Closes-Bug: #1616066
Commit 72a722e69d4579e0df680735ab63305d522736aa moved the file.
We now use the correct import and not the deprecated one.
Change-Id: Ida4a0f622c2b25efdbbccb47ecb2694c6de67677
Closes-bug: #1620516
This removes the deprecation warnings.
In addition to this this also changed HasTenant
to HasProject
Change-Id: I6cce8dffb5f85276d904b101bcd46c04a12a147d
Closes-bug: #1620334
Now that the tenant_id rename has merged in Neutron we can
remove the temporary work-around.
Related Blueprint: keystone-v3
Change-Id: Ic69bb5edee913686bd85c19d9fb0bcae0b3907b3
When query a bgpspeaker's routes, the DVR fip host routes query
will get the routes including the central fip routes. This will
let the central fip has more than one next_hop routes.
This patch adds a RouterExtraAttributes check for the distributed
routers during the DVR fip host routes query.
Change-Id: Idb237d4563236c24c19abd8234cfdec4f2373eee
Closes-Bug: #1608406
All occurences of ``tenant_id`` across the neutron database are
being renamed to ``project_id``.
This neutron-dynamic-routing change accompanies the neutron change:
I87a8ef342ccea004731ba0192b23a8e79bc382dc
Change-Id: If6a4db955a2e00635a37605dc165cf9f2f0fac31
Partially-Implements: blueprint keystone-v3
Raise BadRequest on the absense of the attribute.
Also, ensure that the value is actually a UUID-like.
Closes-Bug: #1595078
Change-Id: I6c236d5e4acdd6f13eca2877163facc2860a9445
This patch moves the BGP service plugin, agent, driver, and
tests out of the neutron repository and into the
neutron-dynamic-routing repository.
Partially-Implements: blueprint bgp-spinout
Partial-Bug: #1560003
Co-Authored-By: vikram.choudhary <vikram.choudhary@huawei.com>
Change-Id: I80ea28a51d7b18e67d6ed4cd2da22520f950300f
This patch adds alembic DB migration framework required by
neutron-dynamic-routing repository for defining new data
models to realize BGP dynamic routing functionality in neutron.
Below changes are done as part of this patch-set:
- Added new alembic migration framework.
- PEP8 changes for alembic migration check.
Change-Id: I395ca9541bceda40bbc0c0870e58c18231ba44e9
Implements: blueprint bgp-spinout
Partial-Bug: #1560003