Add base support for update_port_bulk
As a complement to the create_port_bulk optimizations that took place in the Stein cycle, create the ability to have an ML2 plugin optionally expose an 'update_port_bulk' operation as well. This will permit ML2 plugins to optimize this code path for bulk operations as well. Change-Id: Id2c88a82715bccd1c23213828ef904322ab4386f
This commit is contained in:
parent
8b00349a63
commit
8b50a36341
|
@ -674,7 +674,11 @@ class Controller(object):
|
|||
msg = _('The resource could not be found.')
|
||||
raise webob.exc.HTTPNotFound(msg)
|
||||
|
||||
obj_updater = getattr(self._plugin, action)
|
||||
if self._native_bulk and hasattr(self._plugin, "%s_bulk" % action):
|
||||
obj_updater = getattr(self._plugin, "%s_bulk" % action)
|
||||
else:
|
||||
obj_updater = getattr(self._plugin, action)
|
||||
|
||||
kwargs = {self._resource: body}
|
||||
if parent_id:
|
||||
kwargs[self._parent_id_name] = parent_id
|
||||
|
|
Loading…
Reference in New Issue