Commit Graph

25 Commits

Author SHA1 Message Date
Jayce Houtman 5fe5188ce5 Change exception messages to error log messages for DNS integration.
Change non-harmful stack trace errors for dns_exc.DNSDomainNotFound and
dns_exc.DuplicateRecordSet to error log messages. This prevents the logs
from filling with stack traces where error messages would have been
sufficient enough.

Closes-Bug: #2042925
Change-Id: Icf1fff28bb560c506392f16c579de6d92cd56c23
2024-04-10 17:03:29 +02:00
Brian Haley eaf990b2bc Fix pep8 E128 warnings in non-test code
Reduces E128 warnings by ~260 to just ~900,
no way we're getting rid of all of them at once (or ever).
Files under neutron/tests still have a ton of E128 warnings.

Change-Id: I9137150ccf129bf443e33428267cd4bc9c323b54
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
2019-03-12 21:22:33 +00:00
Boden R 29f56478d1 remove the neutron.db._resource_extend module
The _resource_extend module is already rehomed into neutron-lib and is
shimmed in neutron. This patch removes the module as no active
consumers are using it.

NeutronLibImpact

Change-Id: I1550075fa5fa2aa2f1a88ee7189d311a1fe78391
2019-01-02 13:02:06 -07:00
Brian Haley 7cfdf4aa81 Fix all pep8 E129 errors
Fixed all pep8 E129 errors and changed tox.ini to no longer
ignore them.

Change-Id: I0b06d99ce1d473b79a4cfdd173baa4f02e653847
2018-05-03 13:44:04 +09:00
Boden R 062ef79381 use is_extension_supported from neutron-lib
The is_extension_supported function now lives in neutron-lib. This patch
removes the function from neutron and uses lib's version instead.

NeutronLibImpact

Change-Id: Iccb72e00f85043b3dff0299df7eb1279655e313e
2018-03-12 09:28:52 -06:00
Boden R 54444407f4 use l3 api def from neutron-lib
Commit I81748aa0e48b1275df3e1ea41b1d36a117d0097d added the l3 extension
API definition to neutron-lib and commit
I2324a3a02789c798248cab41c278a2d9981d24be rehomed the l3 exceptions,
while Ifd79eb1a92853e49bd4ef028e7a7bd89811c6957 shims the l3
exceptions.

This patch consumes the l3 api def by:
- Removing the code from neutron that's now in lib.
- Using lib's version of the code where applicable.
- Tidying up the related unit tests as now that the l3 api def from lib
is used the necessary fixture is already setup in the parent chain when
setting up the unit test class.

NeutronLibImpact

Change-Id: If2e66e06b83e15ee2851ea2bc3b64ad366e675dd
2017-12-15 07:03:14 -07:00
Lujin 9566810b38 Integration of Floating IP OVO
This patch integrates floating IP OVO.

Co-Authored-By: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Change-Id: I543669ed3bd59a1f7d5b999e3113bcea7b3c52a8
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
2017-12-04 19:30:02 +09:00
Boden R 72b6db9379 use dns api def from neutron-lib
neutron-lib contains the dns API definition and associated exceptions,
constants, etc. This patch moves all references over to use the API
def from neutron-lib.

NeutronLibImpact

Change-Id: If180cf92d8ae31a0857080239e8233095cd6c768
2017-10-20 16:38:33 -06:00
Inessa Vasilevskaya 7322bd6efb Make code follow log translation guideline
Since Pike log messages should not be translated.
This patch removes calls to i18n _LC, _LI, _LE, _LW from
logging logic throughout the code. Translators definition
from neutron._i18n is removed as well.
This patch also removes log translation verification from
ignore directive in tox.ini.

Change-Id: If9aa76fcf121c0e61a7c08088006c5873faee56e
2017-08-14 02:01:48 +00:00
Henry Gessau b3c0d5f239 Eliminate lookup of "resource extend" funcs by name
By registering functions directly we cut off the dependency of the
"resource extend" functions on the plugin. This is a step towards
the goal of removing the CommonDbMixin mixin class.

Also, we register all "resource extend" functions at plugin create
(in __new__) instead of in the class definition (which caused the
hooks to be registered on import). This ensures the "resource
extend" functions are only registered for the plugins/mixins that
are actually used.

Note that decorators are used to register "resource extend" methods,
similar to the callback receiver decorators.

Related-Blueprint: neutron-lib

Change-Id: I128cfda773d5f9597df9cd61261fdc05f2a174aa
2017-04-21 14:48:42 -04:00
Henry Gessau e7cd868c20 Decouple hook and func registration from CommonDbMixin
Move the model query hook registration and resource extend funcs
registration methods out of the CommonDbMixin class and make them
regular utility functions.

This is a step in refactoring the CommonDbMixin class.

Change-Id: Iec1bb7f7098c83640ae695fd7cf2f4736f414ad2
2017-03-11 18:04:11 -05:00
Ihar Hrachyshka 88e99f6f28 Clean up deprecated sqla model import paths
Those were moved under neutron.db.models start of Ocata. We should be
able to clean them up now.

NeutronLibImpact

Change-Id: Iadbf44d52ee8e30712807384152a29ce1a8b8f72
2017-02-25 03:42:34 +00:00
Manjeet Singh Bhatia 837abf5d4d Add OVO for dns Objects
This patch will introduce ovo for NetworkDNSDomain and
FloatingIPDNS. It also integrates the ovo use for PortDNS
NetworkDNSDomain, FloatingIPDNS

Co-Authored-By: Brandon Logan <brandon.logan@rackspace.com>

Change-Id: I90ace59735c8cb9fa8a02b0e7636a58f0912efa7
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
2016-10-27 17:39:45 +00:00
Manjeet Singh Bhatia ead39faa37 Relocate DNS db models
This patch relocate db models for dns.

Partial-Bug: #1597913

Change-Id: I6d1b43d8c5c8d6f8b80730a16eedac5e59cbed44
2016-10-07 21:35:35 +00:00
Jenkins f4ba9ea8ac Merge "Relocate L3 DB Models" 2016-09-28 01:46:47 +00:00
Manjeet Singh Bhatia 2b66c6a2ed Relocate L3 DB Models
As we have started oslo versioned objects implementations. There
would be issue of cyclic import while implementation for objects
which have db models definitions and mixins in same file. This patch
will move routers models as discussed in [1].

For example DNS models and some queries are in same file [2]. for object
implementation I have separate models definitions and mixins where
queries were being done [3].

[1]. https://www.mail-archive.com/openstack-dev@lists.openstack.org/msg88910.html
[2]. https://review.openstack.org/#/c/334695/15/neutron/db/dns_db.py
[3]. https://review.openstack.org/#/c/334695/15/neutron/db/models/dns_models.py

Change-Id: I9b9a44da5d28252be58cea1a920a64e18d8bbf32
Partial-Bug: #1597913
2016-09-27 16:58:55 +00:00
Kevin Benton 971cf85034 Add missing revision number altercations
This adds revises_on_change for the following models
and API tests to ensure the correct behavior:

* port security (network and port)
* DNS domain (network and port)
* extra dhcp opts (port)
* extra routes (router)
* subnet service type (subnet)

Additionally, it configures the DNS extension to be loaded
in the gate since the extension is enabled for tempest.

Closes-Bug: #1627649
Change-Id: Ifa969c8c2582f8f41d42df07652f259781a36bb5
2016-09-25 02:18:01 -07:00
Henry Gessau 61cc14fd67 Switch to neutron-lib for model_base
Change-Id: If5b2b4cc0346515ddef3da1255ab49327c8e5732
2016-08-31 11:12:18 -04:00
Bin Yu 64f5fc8259 Refactor DNS integration out of DB core plugin
This patch set aims to move all the code related to DNS integration
from the DB core plugin to the DNS ML2 extension module.

By doing this, this patchset removes the dns related code in
db_base_plugin_v2 and the dns exteions module talks with core plugin
only through the method extension_manager and apply_dict_extend_functions

By properly implementing the generation of the dns_assignment attribute
for ports in the DNS ML2 extension module, this patchset also fixes
https://bugs.launchpad.net/neutron/+bug/1579977

Change-Id: I63afb1a1bfeeb14eefb54681dc64959144deeb25
Closes-Bug: #1579601
Closes-Bug: #1579977
2016-07-26 07:33:50 +00:00
Takashi NATSUME 5cef3f726e Add a hacking rule for string interpolation at logging
String interpolation should be delayed to be handled
by the logging code, rather than being done
at the point of the logging call.
So add a hacking rule for it.

See the oslo i18n guideline.

* http://docs.openstack.org/developer/oslo.i18n/guidelines.html

Change-Id: I91e8d59d508c594256d5f74514e62f8f928d1df5
Closes-Bug: #1596829
2016-07-11 22:54:56 +00:00
Jenkins d320df540d Merge "Don't load DNS integration in l3_router_plugin" 2016-05-26 19:35:35 +00:00
Miguel Lavalle 56962922cc Don't load DNS integration in l3_router_plugin
In this patchset we stop the l3_router_plugin from loading the DNS integration
extension. The DNS integration extension should only be configured by the
operator by adding 'dns' to the 'extension_driver' list in ml2_conf.ini

Change-Id: I1321d9821973fe918005a8c2f3dd751af9affe38
Closes-Bug: #1574694
2016-05-01 23:57:29 +00:00
Henry Gessau 78fff41ee3 Use converters and validators from neutron-lib
Related-Blueprint: neutron-lib

Change-Id: I6b9079e9e703c6fd75adbed3846e7257685433e8
2016-04-24 19:13:10 -04:00
Henry Gessau ae5bad49cc Use exceptions from neutron-lib
Related-Blueprint: neutron-lib

Change-Id: Ia014468bd621c4ee6aea95bf19328c61070174c4
2016-04-21 21:29:44 -04:00
Miguel Lavalle 93ac8b3a33 External DNS driver reference implementation
An interface with an external DNS service is defined for Neutron. A reference
implementation is also included, based on Designate. The interface and the
driver will enable users to publish in the external DNS service the dns_name
and dns_domain attributes associated with floating ips, ports and networks. As
a consequence, the floating ips and networks api is extended to manage dns_name
and dns_domain attributes. The dns_name attribute was added to ports in a
preceding commit

DocImpact: Introduce config option external_dns_driver to specify a driver
for external dns integration. For more info, see
doc/source/devref/external_dns_integration.rst

APIImpact
Implements: blueprint external-dns-resolution

Change-Id: Ic298ad2558410ab9a614f22e1757d1fc8b22c482
2016-01-21 21:55:08 +00:00