Fixing octavia-grenade job and disabling pylint warnings

grenade now updates from an ML2/OVN deployment. Octavia needs to source
the devstack/lib/octavia file from neutron, which provides the functions
that manage the octavia management interfaces.

The commit also removes false-positive pylint warnings, an issue was
reported to the pylint project:
https://github.com/PyCQA/pylint/issues/8497

Change-Id: Ie26a154c320d8527e54b871a3b99bbbc3c2ee811
This commit is contained in:
Gregory Thiemonge 2023-03-25 12:07:44 +01:00
parent ba92aeb946
commit afb4d151f7
3 changed files with 8 additions and 0 deletions

View File

@ -16,6 +16,8 @@ OCTAVIA_DEVSTACK_DIR=$(dirname $(dirname $0))
source $OCTAVIA_DEVSTACK_DIR/settings
source $OCTAVIA_DEVSTACK_DIR/plugin.sh
source ${GITDIR[neutron]}/devstack/lib/octavia
set -o xtrace
octavia_stop

View File

@ -246,6 +246,8 @@ class Plug(object):
try:
with pyroute2.IPRoute() as ipr:
idx = ipr.link_lookup(address=mac)[0]
# Workaround for https://github.com/PyCQA/pylint/issues/8497
# pylint: disable=E1136, E1121
addr = ipr.get_links(idx)[0]
for attr in addr['attrs']:
if attr[0] == consts.IFLA_IFNAME:

View File

@ -181,6 +181,8 @@ class InterfaceController(object):
with pyroute2.IPRoute() as ipr:
idx = ipr.link_lookup(ifname=interface.name)[0]
# Workaround for https://github.com/PyCQA/pylint/issues/8497
# pylint: disable=E1136, E1121
link = ipr.get_links(idx)[0]
current_state = link.get(consts.STATE)
@ -370,6 +372,8 @@ class InterfaceController(object):
with pyroute2.IPRoute() as ipr:
idx = ipr.link_lookup(ifname=interface.name)[0]
# Workaround for https://github.com/PyCQA/pylint/issues/8497
# pylint: disable=E1136, E1121
link = ipr.get_links(idx)[0]
current_state = link.get(consts.STATE)