Switched to pyroute2.config.asyncio.asyncio_config

To monkey patch socket module for pyroute2, we call eventlet_config.
In recent releases of the library, this becomes deprecated. Instead, we
should now use asyncio_config() to patch stdlib.

When building module index for tacker docs, it creates a warning,
treated as error: Please use pyroute2.config.asyncio.asyncio_config

Closes-Bug: #1761925
Change-Id: I8f21cfa02e1201f4968ec0ce1fb6865ef591678d
This commit is contained in:
Nguyen Hai 2018-04-07 13:55:53 +09:00
parent 6bea5c85f7
commit 94d53dc596

View File

@ -22,5 +22,5 @@ from oslo_utils import importutils
def monkey_patch():
eventlet.monkey_patch(all=False, socket=True)
if os.name != 'nt':
p_c_e = importutils.import_module('pyroute2.config.eventlet')
p_c_e.eventlet_config()
p_c_e = importutils.import_module('pyroute2.config.asyncio')
p_c_e.asyncio_config()