Remove deprected and unused argument from update_port_status()
The optional network argument was deprecated in update_port_status() in Pike. Let's remove it as there are are only in-tree callers passing it anymore. TrivialFix Change-Id: Iab8d3dada2e147da009e195700e64b072e5bfabb
This commit is contained in:
parent
5c3f1cd02f
commit
eddde3522b
@ -2341,13 +2341,11 @@ class Ml2Plugin(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
return {d: self._bind_port_if_needed(pctx) if pctx else None
|
||||
for d, pctx in result.items()}
|
||||
|
||||
def update_port_status(self, context, port_id, status, host=None,
|
||||
network=None):
|
||||
def update_port_status(self, context, port_id, status, host=None):
|
||||
"""Update port status
|
||||
|
||||
Returns port_id (non-truncated uuid) if the port exists.
|
||||
Otherwise returns None.
|
||||
'network' is deprecated and has no effect
|
||||
"""
|
||||
full = db.partial_port_ids_to_full_ids(context, [port_id])
|
||||
if port_id not in full:
|
||||
|
@ -134,8 +134,7 @@ class RpcCallbacks(type_tunnel.TunnelRpcCallbackMixin):
|
||||
plugin.update_port_status(rpc_context,
|
||||
port_id,
|
||||
new_status,
|
||||
host,
|
||||
port_context.network.current)
|
||||
host)
|
||||
return result
|
||||
|
||||
def _get_device_details(self, rpc_context, agent_id, host, device,
|
||||
|
@ -1412,17 +1412,6 @@ class TestMl2PortsV2(test_plugin.TestPortsV2, Ml2PluginV2TestCase):
|
||||
plugin.update_port(ctx, port['port']['id'], port)
|
||||
self.assertFalse(sg_member_update.called)
|
||||
|
||||
def test_update_port_status_with_network(self):
|
||||
registry.clear() # don't care about callback behavior
|
||||
ctx = context.get_admin_context()
|
||||
plugin = directory.get_plugin()
|
||||
with self.port() as port:
|
||||
net = plugin.get_network(ctx, port['port']['network_id'])
|
||||
with mock.patch.object(plugin, 'get_networks') as get_nets:
|
||||
plugin.update_port_status(ctx, port['port']['id'], 'UP',
|
||||
network=net)
|
||||
self.assertFalse(get_nets.called)
|
||||
|
||||
def test_update_port_mac(self):
|
||||
self.check_update_port_mac(
|
||||
host_arg={portbindings.HOST_ID: HOST},
|
||||
|
Loading…
x
Reference in New Issue
Block a user