Browse Source

Merge "Remove plugins.ml2.db.get_binding_levels"

changes/24/706824/1
Zuul 1 week ago
parent
commit
6709cfcdfa
2 changed files with 6 additions and 20 deletions
  1. +0
    -20
      neutron/plugins/ml2/db.py
  2. +6
    -0
      releasenotes/notes/remove-get_binding_levels-c4e8b350a196706a.yaml

+ 0
- 20
neutron/plugins/ml2/db.py View File

@@ -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:

+ 6
- 0
releasenotes/notes/remove-get_binding_levels-c4e8b350a196706a.yaml View File

@@ -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