Remove plugins.ml2.db.get_binding_levels

This method was deprecated in Stein and marked for removal in Train.

Trivial-Fix

Change-Id: I6e25974bd244dbc36d2bdc94de5fc4a85704b787
changes/43/703143/5
Rodolfo Alonso Hernandez 3 years ago
parent d5b33ffc77
commit a05a3ba413
  1. 20
      neutron/plugins/ml2/db.py
  2. 6
      releasenotes/notes/remove-get_binding_levels-c4e8b350a196706a.yaml

@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from debtcollector import removals
from neutron_lib.api.definitions import portbindings
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
@ -65,25 +64,6 @@ def set_binding_levels(context, levels):
LOG.debug("Attempted to set empty binding levels")
@removals.remove(
version="Stein", removal_version="T",
message="Function get_binding_levels is deprecated. Please use "
"get_binding_level_objs instead as it makes use of OVOs.")
@db_api.CONTEXT_READER
def get_binding_levels(context, port_id, host):
if host:
result = (context.session.query(models.PortBindingLevel).
filter_by(port_id=port_id, host=host).
order_by(models.PortBindingLevel.level).
all())
LOG.debug("For port %(port_id)s, host %(host)s, "
"got binding levels %(levels)s",
{'port_id': port_id,
'host': host,
'levels': result})
return result
@db_api.CONTEXT_READER
def get_binding_level_objs(context, port_id, host):
if host:

@ -0,0 +1,6 @@
---
deprecations:
- |
Function neutron.plugins.ml2.db.get_binding_levels was deprecated
in favor of neutron.plugins.ml2.db.get_binding_level_objs and now
is removed.
Loading…
Cancel
Save