Remove plugins.ml2.db.get_binding_levels
This method was deprecated in Stein and marked for removal in Train. Trivial-Fix Change-Id: I6e25974bd244dbc36d2bdc94de5fc4a85704b787
This commit is contained in:
parent
d5b33ffc77
commit
a05a3ba413
@ -13,7 +13,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from debtcollector import removals
|
|
||||||
from neutron_lib.api.definitions import portbindings
|
from neutron_lib.api.definitions import portbindings
|
||||||
from neutron_lib.callbacks import events
|
from neutron_lib.callbacks import events
|
||||||
from neutron_lib.callbacks import registry
|
from neutron_lib.callbacks import registry
|
||||||
@ -65,25 +64,6 @@ def set_binding_levels(context, levels):
|
|||||||
LOG.debug("Attempted to set empty binding 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
|
@db_api.CONTEXT_READER
|
||||||
def get_binding_level_objs(context, port_id, host):
|
def get_binding_level_objs(context, port_id, host):
|
||||||
if 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…
Reference in New Issue
Block a user