Merge "Add base support for update_port_bulk"

This commit is contained in:
Zuul 2019-07-10 03:37:21 +00:00 committed by Gerrit Code Review
commit 801fde7988
1 changed files with 5 additions and 1 deletions

View File

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