neutron/devstack/lib/octavia
Ihar Hrachyshka 25d0273588 Remove linuxbridge driver
It's been experimental for some time. The project struggles with a
matrix of configurations, obsolete docs etc. It's better to remove code
than let it rot. Interested parties are recommended to migrate to a
supported driver (preferrably the default driver for neutron - OVN), or
take over maintenance of the linuxbridge driver out-of-tree.

Change-Id: I2b3a08352fa5935db8ecb9da312b7ea4b4f7e43a
2025-01-20 09:45:43 -05:00

33 lines
1.2 KiB
Bash

#!/usr/bin/env bash
# Save trace setting
XTRACE=$(set +o | grep xtrace)
set +o xtrace
function octavia_create_network_interface_device {
INTERFACE=$1
MGMT_PORT_ID=$2
MGMT_PORT_MAC=$3
if [[ $NEUTRON_AGENT == "openvswitch" || $Q_AGENT == "openvswitch" || $NEUTRON_AGENT == "ovn" || $Q_AGENT == "ovn" ]]; then
if [[ $NEUTRON_AGENT == "ovn" || $Q_AGENT == "ovn" ]]; then
openstack subnet set --gateway none lb-mgmt-subnet
fi
sudo ovs-vsctl -- --may-exist add-port ${OVS_BRIDGE:-br-int} $INTERFACE -- set Interface $INTERFACE type=internal -- set Interface $INTERFACE external-ids:iface-status=active -- set Interface $INTERFACE external-ids:attached-mac=$MGMT_PORT_MAC -- set Interface $INTERFACE external-ids:iface-id=$MGMT_PORT_ID -- set Interface $INTERFACE external-ids:skip_cleanup=true
else
die "Unknown network controller - $NEUTRON_AGENT/$Q_AGENT"
fi
}
function octavia_delete_network_interface_device {
if [[ $NEUTRON_AGENT == "openvswitch" || $Q_AGENT == "openvswitch" || $NEUTRON_AGENT == "ovn" || $Q_AGENT == "ovn" ]]; then
: # Do nothing
else
die "Unknown network controller - $NEUTRON_AGENT/$Q_AGENT"
fi
}
# Restore xtrace
$XTRACE