Commit Graph

70 Commits

Author SHA1 Message Date
Brian Haley 16474fcf24 Fix used-before-assignment warnings
Moved some code around to avoid the warning.

No functional change.

TrivialFix

Change-Id: I5451e411dccf639dcab50ed10edf0cf57edeac45
2024-02-21 19:20:45 -05:00
Thomas Goirand bf2f8342d7 python-3.12: do not use datetime.datetime.utcnow()
This is deprecated in the favor of:
oslo_utils.timeutils.utcnow()

Change-Id: Ic7304aea55258822b0be59ce45c6686182f4ecd0
2024-01-20 04:30:48 +00:00
Slawek Kaplonski 670cc383e0 [S-RBAC] Switch to new policies by default
As part of the Secure RBAC community goal, we should switch options
"enforce_new_defaults" and "enforce_scope" to be True by default.
It will be still possible to fallback to old policy rules by configuring
those config options to False in Neutron config.

Change-Id: I09c0026ccf87e6c0bb1fa59165c03dc508fba6fa
2023-04-21 16:22:42 +02:00
Slawek Kaplonski 8df2f69b6f Handle properly ObjectNotFound while deleting network from DHCP agent
In case when 2 neutron servers are trying to remove network from the
same DHCP agent it may happend that one of them will not be able
to find binding object anymore thus deletion of that binding object
will raise ObjectNotFound exception.
This patch adds proper handling of such case to not raise ugly
stacktrace in neutron logs.

Closes-Bug: #1970759
Change-Id: I67d516c4583aa0c20416114b92a6d69ece5b970c
2022-05-02 12:27:08 +02:00
Sahid Orentino Ferdjaoui b5b519a4fa segments: fix scheduling duplicate segments
It has been reported by bug #1959750 that for a given network the
agent is scheduling all segments reported by agent.

This commit is fixing the issue by ensuring scheduling segments per
network that they belong to only.
A test has been updated to demonstract the fact that for a given
network we only schedule the related segments.

Closes-bug: #1959750
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
Change-Id: Icd57570004055903c6817a75d814ed65db3fa53c
2022-02-14 16:06:17 +01:00
Slawek Kaplonski 042de7e6bb Deprecate 'allow_overlapping_ips' config option
Config option allow_overlapping_ips is deprecated to removal now and
will be removed in the Z cycle.
Default value for that option is now set to True as this is supported by
IPAM module in Neutron.

Related-Bug: #1942294
Change-Id: I17bf5e4483025e9cc4ee04dd3e7c925f7bddc3db
2021-10-21 10:56:33 +00:00
Oleg Bondarev 130655cdb9 DHCP notification optimization
DHCP notification is done after each create/update/delete for
network, subnet and port.
This notification currently has to retrieve network from DB almost
every time, which is a quite heavy DB request and hence affects
performance of port and subnet CRUD.

This patch suggests 2 optimizations:
- do not fetch network if not needed (only fetch when schedule needed)
- for port and subnet AFTER_CREATE event pass network dict from plugin

According to Rally tests these changes improve performance:
- port create ~20%
- port update ~20%
- subnet create ~15%
- port delete and subnet update/delete - not tested

Closes-Bug: #1923161
Change-Id: I0ab836ac09225f4f3ad435e9ceaf315018855d52
2021-04-09 13:33:43 +03:00
Slawek Kaplonski 5c931f2913 Schedule networks to new segments if needed
In case when subnet in segment X was created before hosts from
that segment was mapped in the Neutron DB, network wasn't scheduled
to the DHCP agents in that new segment.
Now DHCP scheduler is triggered in such case.

Closes-bug: #1917811
Change-Id: Ic9e64aa4ecdc3d56f00c26204ad931b810db7599
2021-03-05 16:03:49 +00:00
Brian Haley 7594bb0627 Remove the dependency on the "mock" package
Now that we are python3 only, we should move to using the built
in version of mock that supports all of our testing needs and
remove the dependency on the "mock" package.

This patch moves all references to "import mock" to
"from unittest import mock". It also cleans up some new line
inconsistency.

Fixed an inconsistency in the OVSBridge.deferred() definition
as it needs to also have an *args argument.

Fixed an issue where an l3-agent test was mocking
functools.partial, causing a python3.8 failure.

Unit tests only, removing from tests/base.py affects
functional tests which need additional work.

Change-Id: I40e8a8410840c3774c72ae1a8054574445d66ece
2020-04-28 18:05:37 -04:00
ushen 480b04ce04 Unnecessary routers should not be created
We observe an excessive amount of routers created on
compute node on which some virtual machines got a fixed
ip on floating network.

Rpc servers should filter out those unnecessary routers
during syncing.

Change-Id: I299031a505f05cd0469e2476b867b9dbca59c5bf
Partial-Bug: #1840579
2019-12-19 09:45:44 +08:00
Reedip 139b496ef9 Dont schedule Network, respecting network_auto_schedule config
Currently, if dhcp mapping from a network is removed, it is reassigned
to the network. This is because of the Network Scheduler's schedule
function, which considers balancing the networks with the agents, whether
enable_dhcp is set on its subnets or not. It does not take into account
the network_auto_schedule config option. This is particularly disturbing
when considering backends which have their provide their own DHCP.

With this patch, if network_auto_schedule is set to False, networks wont
be automatically scheduled to DHCP Agents. If DHCP is to be mapped to a
network, it can be mapped using the CLI itself.

While it may seem that this change is breaking what is already working,
but as mentioned earlier, if there are network backends which provide DHCP
support themselves, they wont need the automatic mapping, which the term
"network_auto_schedule" actually stands for.

Closes-Bug: #1647421
Change-Id: If1a6a2a174d0f737415efa2abce518722316a77b
2019-11-26 01:55:03 +00:00
Rodolfo Alonso Hernandez b71cd851dc Switch to new engine facade for Schedulers
* DhcpAgentSchedulerDbMixin
* L3AgentSchedulerDbMixin
* AutoScheduler
* DhcpFilter
* L3Scheduler

Partially-Implements blueprint: enginefacade-switch

Change-Id: I26a0e651a5c9d30004e2e5a7cfc6b866415cc87b
2019-06-12 19:46:25 +00:00
Boden R 024802aafd remove neutron.common.rpc
The neutron.common.rpc module has been in neutron-lib for awhile now and
neutron is shimmed to use neutron-lib already.
This patch removes neutron.common.rpc and switches the code over to use
neutron-lib's implementation where needed.

NeutronLibImpact

Change-Id: I733f07a8c4a2af071b3467bd710290eee11a4f4c
2019-02-06 11:05:55 -07:00
Doug Wiegley 8914f8247f Update neutron files for new over-indentation hacking rule (E117)
Change-Id: I594e2d1238f6ffa3c1039624e3b3ed6569485837
2019-01-29 15:36:20 -05:00
yangjianfeng 99f4495c94 Improve port dhcp Provisioning
Currently, the dhcp Provisioning of ports is the crucial bottleneck
of that concurrently boot multiple VM.

The root cause is that these ports will be processed one by one by dhcp
agent when they belong to the same network, And the 'Provisioning complete'
port is still blocked other port's processing in other dhcp agents. The
patch aim to optimize the dispatch strategy of the port cast to agent to
improve the Provisioning process.

In server side, I classify messages to multi levels. Especially, I classify
the port_update_end or port_create_end message to two levels, the high-level
message only cast to one agent, the low-level message cast to all agent. In
agent side I put these messages to `resource_processing_queue`, with the queue,
We can delete `_net_lock` and process these messages in order of priority.

Additonally, I modified the `resource_processing_queue` for my demand. I update
`_queue` from LIST to PriorityQueue in `ExclusiveResourceProcessor`, by this
way, we can sort all message which cached in `ExclusiveResourceProcessor` by
priority.

Related-Bug: #1760047
Change-Id: I255caa0571c42fb012fe882259ef181070beccef
2019-01-28 07:26:45 +00:00
Boden R 4bd2f0e8f7 shim neutron rpc with neutron-lib
The common rpc and exceptions were rehomed into
neutron-lib with [1]. This patch shims those rehomed
modules in neutron to switch over to neutron-lib's
versions under the covers.

To do so:
- The rpc and common exceptions are changed to
reference their counterpart in neutron-lib effectively
swapping the impl over to neutron-lib.
- The fake_notifier is removed from neutron and lib's
version is used instead.
- The rpc tests are removed; they live in lib now.
- A few unit test related changes are required
including changing mock.patch to mock.patch.object,
changing the mock checks for a few UTs as they don't
quite work the same with the shim in place.
- Using the RPC fixture from neutron-lib rather than
that setup in neutron's base test class.

With this shim in place, consumers are effectively using
neutron-lib's RPC plumbing and thus we can move consumers
over to neutron-lib's version at will. Once all
consumers are moved over we can come back and remove
the RPC logic from neutron and follow-up with a consumption
patch.

NeutronLibImpact

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

Change-Id: I87685be8764a152ac24366f13e190de9d4f6f8d8
2018-08-22 11:20:53 -06:00
Kailun Qin 8b16b53b5b Send update instead of remove for DVR reschedule
The current "agent remove-add" method to reschedule a router is not
friendly for DVR. In DVR cases, the old agent may still need to keep the
router in a non-master role to service any VM ports that exit on that
host while the new agent handles the master role of the router.

This patch proposes to send "update" instead of "remove" notification
for DVR rescheduling, which aligns with the retain_router check in
remove_router_from_l3_agent as well.

Closes-Bug: #1781179
Change-Id: I23431f9f46f72e6bce91f3d1fb0ed328d55930fb
2018-07-12 15:14:04 +08:00
Kailun Qin fe907b7fc6 Fix unscheduling fail when concurrent port delete
When a network is removed from a dhcp agent, in some scenarios if the
agent releases its port concurrently, there is chance that the
unscheduling will fail due to that the target port is not found.

Catch the PortNotFound exception as an expected error under this type of
concurrent circumstance and logs it to move forward.

Closes-Bug: #1775496
Change-Id: Ib51b364f6ced0de7685c8ee07c1d292308d919f5
Signed-off-by: Kailun Qin <kailun.qin@intel.com>
2018-06-09 02:58:20 +08:00
Boden R 1128619f1c use dhcpagentscheduler api def from neutron-lib
The dhcpagentscheduler extension's API definition was rehomed into
neutron-lib with https://review.openstack.org/#/c/520751/
This patch consumes it by using the API definition and it's constants
where applicable.

NeutronLibImpact

Change-Id: Ib0c97268f01885f6daacb3d1cdbbd94bb6020d60
2018-05-24 10:21:07 -06: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
Sławek Kapłoński 7b0f6330d6 Handle AgentNotFoundByTypeHost exception properly
During listing router_ids on host it is possible that on some hosts
there are no L3 agents.
In such case AgentNotFoundByTypeHost exception is raised in
neutron.db.agents_db module in _get_agent_by_type_and_host() method.
Now this exception is properly handled during listing routers on host.

Change-Id: Ia5ff1b57ef63c98b4ada4f2d46c45336e413be3d
Closes-Bug: #1737917
2018-04-05 11:16:45 +00:00
Vu Cong Tuan 8b381c7324 Use Agent OVO in agents_db and test_agents_db
Agent object has been merged [1].
This patch uses Agent object in agents_db and test_agents_db.

We also introduce a new function (get_agents_object) and keep
the old function (get_agents_db) for backward compatibility.

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

Co-Authored-By: Nguyen Phuong An <AnNP@vn.fujitsu.com>
Change-Id: I4c4283cb1aa05d52dca00cc249e094ea7d55b1d3
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
2017-11-03 16:46:09 +07:00
Boden R 277996b68d cleanup unit test usage of api extension maps
Today our unit test code uses various ways to "patch" the global
RESOURCE_ATTRIBUTE_MAP as well as extension specific maps in some cases.
This patch consolidates such patching whereby tests should use neutron's
AttributeMapMemento in their setup() chain (only once) if they update
the global map and they should individually handle backup/restore of per
extension map updates. This change will simplify the code and make it
easier to phase-in API definition usage with neutron-lib where we have
some as API definitions and others not. Longer term the
AttributeMapMemento will be replace with neutron-lib's fixture as we
move all extension maps to API definitions in neutron-lib.

Change-Id: I2586f0b11b107d7f57214a0d65bcf7c38a5f0ebb
2017-10-24 10:38:52 -06:00
Boden R 0822b0aef4 consume common constants from lib
The neutron-lib commit I360545b6ee4291547e0c5c8e668ad03d3efa4725 moved
the externally consumed globals from neutron.common.constants into lib.
With the exception of PROVISIONAL_IPV6_PD_PREFIX all other constants
in neutron.common.constants should only be used in neutron, and will
hopefully remain that way. External consumers needing access to other
common constants should move them into lib first.

NeutronLibImpact

Change-Id: Ie4bcffccf626a6e1de84af01f3487feb825f8b65
2017-10-13 11:45:18 -06:00
Boden R 0a1405794f use service type constants from neutron_lib plugins
The well known service type constants are in
neutron_lib.plugins.constants, but for legacy reasons a few still exist
and are referenced from neutron_lib.constants that we'd like to remove.
This patch switches references over to neutron_lib's plugin constants.

Change-Id: I1861448cec303725b30cef8f42029f467f9e03a3
2017-06-27 15:16:05 -06:00
Jenkins 09fe4aa92d Merge "[OVO] Integration of RouterL3AgentBinding" 2017-05-27 05:04:19 +00:00
Anindita Das 7e51f2aea5 [OVO] Integration of RouterL3AgentBinding
This patch integrates the OVO created for RouterL3AgentBinding into
the code base.

Change-Id: I0af665a97087ad72431d58f04089a804088ef005
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
2017-05-26 13:17:58 -07:00
Kevin Benton 78902f5e36 Stop DHCP agent scheduler warnings in UTs
This prevents all of the warnings in unit tests about
no DHCP agents being available for scheduling during
network and port creation.

TrivialFix
Change-Id: I06cb626496866b90f60b406d1141ecad6e1a47e1
2017-04-20 01:12:55 -07:00
Armando Migliaccio ca751a1486 Spin off context module
NeutronLibImpact

Partially-implements: blueprint neutron-lib

Change-Id: I48cf45dc1b07035d952152eac2548a3bd9fc2832
2017-03-06 16:25:29 +00:00
Armando Migliaccio 17563a802e Adopt neutron-lib plugin directory
Neutron Manager is loaded at the very startup of the neutron
server process and with it plugins are loaded and stored for
lookup purposes as their references are widely used across the
entire neutron codebase.

Rather than holding these references directly in NeutronManager
this patch refactors the code so that these references are held
by a plugin directory.

This allows subprojects and other parts of the Neutron codebase
to use the directory in lieu of the manager. The result is a
leaner, cleaner, and more decoupled code.

Usage pattern [1,2] can be translated to [3,4] respectively.

[1] manager.NeutronManager.get_service_plugins()[FOO]
[2] manager.NeutronManager.get_plugin()
[3] directory.get_plugin(FOO)
[4] directory.get_plugin()

The more entangled part is in the neutron unit tests, where the
use of the manager can be simplified as mocking is typically
replaced by a call to the directory add_plugin() method. This is
safe as each test case gets its own copy of the plugin directory.
That said, unit tests that look more like API tests and that rely on
the entire plugin machinery, need some tweaking to avoid stumbling
into plugin loading failures.

Due to the massive use of the manager, deprecation warnings are
considered impractical as they cause logs to bloat out of proportion.

Follow-up patches that show how to adopt the directory in neutron
subprojects are tagged with topic:plugin-directory.

NeutronLibImpact

Partially-implements: blueprint neutron-lib

Change-Id: I7331e914234c5f0b7abe836604fdd7e4067551cf
2016-11-23 04:45:33 -07:00
Kevin Benton 8eac5e2db7 Move AgentStatusCheckWorker to PeriodicWorker
Renames the AgentStatusCheckWorker class to PeriodicWorker
and moves it into the worker module since there isn't anything
agent-specific about it and it can be used for other periodic
jobs server side.

TrivialFix
Change-Id: Ic7a55ef534f64e6bfc60ae38bb0e139a0078510b
2016-11-17 15:31:19 -08:00
Kevin Benton 7c7e2418a2 Fix reset/start methods on AgentStatusCheckWorker
This worker would fail to start again if stop() or reset()
was called on it because of some bad conditional logic. This
doesn't appear to impact the current in-tree use case but
it should behave correctly.

Closes-Bug: #1641788
Change-Id: Id6334c1ef6c99bd112ada31e8fe3746d7e035356
2016-11-17 20:58:42 +00:00
tonytan4ever e669e7b96b Relocate Agent DB model
This patch set is for breaking the circular dependency between
Agent/AgentVersionedObject.
See:https://review.openstack.org/#/c/297887/ for details.

Change-Id: I7be4ce2513e49e6da46a7bdffb8538613f0be7c7
Partial-Bug: #1597913
Co-Authored-By: Victor Morales <victor.morales@intel.com>
Co-Authored-By: Sindhu Devale <sindhu.devale@intel.com>
2016-10-07 14:18:19 -04:00
sindhudevale 930655cf57 Relocate RouterL3AgentBinding DB model
As there would be issue of cyclic imports while
implementation of objects for l3agentbinding which has
db models definition and mixins in same file, this patch will
relocate l3agentbinding models.

Change-Id: Idef2fe3e16b245da849e2d29c5578e5f5d081dc4
Partial-Bug: #1597913
2016-09-28 09:20:27 -05:00
Kevin Benton 181bdb374f Make DHCP notifier use core resource events
This makes the notifier subscribe to core resource events
and leverage them if they are available. This solves the
issue where internal core plugin calls from service plugins
were not generating DHCP agent notifications.

Closes-Bug: #1621345
Change-Id: I607635601caff0322fd0c80c9023f5c4f663ca25
2016-09-14 00:40:09 -07:00
Kevin Benton 4d85336ec1 Make callback manager Object Oriented friendly
The callback manager was indexing callbacks based on
a callback ID generated from oslo utils reflection.
This presented two problems.

The first was that in py34 get_callable_name would use
__qualname__ which returns the class name the function
is defined on rather than the class of the object itself.
So two classes defined in the same module inheriting from
the same parent class could not both subscribe a method
defined on the parent.

The second more general problem is that two objects which
are instances of the same class cannot subscribe the same
method because they have the same ID.

This adds the hash of the method to the ID to prevent these
issues. The hash by itself could have been used but it's not
very user-friendly so the name is left on for nice log
messages.

Change-Id: Iff1ca8c4ddb58ca5907d21fa0de7f0f292b6fc0e
2016-08-17 10:17:14 +00:00
Gary Kotton deb0e49477 Neutron-lib: use the L3_AGENT* definitions from neutron-lib
This removes deprecation warnings

TrivialFix

Change-Id: Ia4979c2cafa856efe0f725a74b436f690cea70c2
2016-08-01 06:50:11 -07:00
Jenkins f3cde0c31b Merge "Add flavor/service provider support to routers" 2016-07-28 23:48:35 +00:00
Ihar Hrachyshka 2a23527a9a tests: stop using ml2 plugin full import paths in tests
Stevedore documentation suggest that full import paths are not supposed
to be user visible. Since unit tests emulate users when configuring
oslo.config, we better off relying on well known plugin aliases than
internal details.

For in-tree that may be not a big deal, but with it we set a bad example
for third parties that may later find their tests broken eg. when we
decide to move code around.

TrivialFix

Change-Id: I7bd036ac3df7e7f4c678356d0a793e7d38599dda
2016-07-27 10:40:22 +00:00
Kevin Benton 0e3f4b8335 Add flavor/service provider support to routers
This is the initial support for flavors and multiple service
providers with the built-in L3 service plugin.

This patch handles a few key components:

* Adds an optional flavor_id to the router data model
* Adds a new driver controller that performs the following tasks:
  * Loads up the configured drivers and 4 default drivers representing
    the current matrix of ha/dvr options (single node, ha, dvr, and ha+dvr)
  * Associates every router with a driver based on ha/dvr attributes
    or the flavor_id if specified

Note that the current drivers are very limited because they don't do anything.
All of the complex logic for the in-tree drivers is still tied up in the giant
mixin the service plugin inherits. Breaking that apart will be in follow-up
patches.

Partially-Implements: blueprint multi-l3-backends
Change-Id: Idce75bf0fc1375dcbbff9b9803fd2fe97d158cff
2016-07-26 16:13:35 -07:00
Jenkins e7f68bfff3 Merge "Not auto schedule router when sync routers from agent" 2016-06-28 15:38:10 +00:00
Jenkins 2d5684fcd9 Merge "Move DHCP notification logic out of API controller" 2016-06-26 11:45:35 +00:00
Hong Hui Xiao 64726983f2 Not auto schedule router when sync routers from agent
In this patch, auto schedule router will be removed from sync_routers,
so that the reported bug can be fixed. And potential race can be avoid
accoridng to [1]

The result of patch will make the l3 agent can't get the router info
when the router is not bound to the l3 agent. And router in agent will
be removed during the agent processing. This makes sense, since, in
neutron server, the router is not tied to the agent. For DVR, if there
are service port in the agent host, the router info will still be
returned to l3 agent.

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

Change-Id: Id0a8cf7537fefd626df06064f915d2de7c1680c6
Co-Authored-By: John Schwarz <jschwarz@redhat.com>
Closes-Bug: #1593653
2016-06-25 02:09:33 +00:00
Armando Migliaccio 877778ee4c Move DHCP notification logic out of API controller
Bug 1591766 unveiled an issue where calling the plugin API does not trigger
DHCP notifications. This is required by the auto-allocated-topology service
plugin that calls core_plugin.update_network(), and expect notifications
to be sent out on state changes. To accomplish this, the logic has been
encapsulated in the DHCP module, and leveraged via callback mechanisms.

For this reason, new events have been introduced, AFTER_REQUEST, and
BEFORE_RESPONSE. The latter in particular is the one needed to hook up
dhcp notifications in order to preserve backward compatibility.

More precisely, core plugins that use DHCP as is or implement their own,
(with or without an agent) should already instantiate their own notifier,
and if they do not, this should be rectified.

A search on codesearch.openstack.org reveals that out-of-tree plugins
already specify their own notifiers, and the default initialization is
clearly redundant now.

Related-bug: #1591766

Change-Id: I7440becb6d30af7159ecaeba09d7a28eceb71bea
2016-06-24 00:41:20 -07:00
Jenkins b9c2f5444d Merge "Remove the deprecated config 'router_id'" 2016-06-23 20:44:55 +00:00
Hong Hui Xiao 448bc8e522 Remove the deprecated config 'router_id'
It was deprecated at [1].
Remove the deprecated config 'router_id' and its related tests.

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

DocImpact: All references of 'router_id' configuration option
and its description should be removed from the docs.

UpgradeImpact: Remove 'router_id' configuration option from the
l3_agent.ini.

Change-Id: Ic9420191e8c1a333e4dcc0b70411591b8573ec7c
Closes-Bug: #1594711
2016-06-23 10:12:55 +00:00
Dmitriy Ukhlov 483c5982c0 Revert "Revert "Remove threading before process forking""
This reverts commit b1cdba1696

Original patch was reverted because it broke neutron plugin's
backward compatibility and needed more work.

This patch fixes that problems:
1) original behaviour of add_agent_status_check,
   start_periodic_l3_agent_status_check and
   start_periodic_dhcp_agent_status_check methods is deprecated but kept
   for using in third part plugins for backward compatibility
2) new add_agent_status_check_worker, add_periodic_l3_agent_status_check
   and add_periodic_dhcp_agent_status_check method are implemented
   instead and are used for implementing plugins in neutron codebase

Closes-Bug: #1569404

Change-Id: I3a32a95489831f0d862930384309eefdc881d8f6
2016-06-02 21:26:08 +00:00
Aaron Rosen 6c183e9fb8 Update unit tests to use correct method being used
get_active_networks() has no longer been used since havana. This patch
migrates the existing tests calling this method to use the current method
that is being used: get_active_networks_info().

Change-Id: Ibd6871b4884a2694983c4a572e00647674df67ae
2016-05-19 13:38:49 -07:00
Inessa Vasilevskaya 495f417c8c agentnotifiers: retried notifications refactor
This patch introduces retry(func, max_attempts) method
which wraps the original func in such a way,
that if execution results in MessagingException,
the given function will be retried for max_attempts
till success or MessagingException is raised.
The function is in the utils module and can be reused
by different agentnotifiers if necessary.

Change-Id: I0d0c17e500e44c1a17438c29a0e76a9ef00872e8
2016-04-28 00:32:51 +03:00
Henry Gessau 4148a347b3 Use constants from neutron-lib
With this we enable the deprecation warnings by default.

Related-Blueprint: neutron-lib

Change-Id: I5b9e53751dd164010e5bbeb15f534ac0fe2a5105
2016-04-23 21:23:56 -04:00