Skip to content

Commit

Permalink
Merge pull request #1235 from zh805/api-dict
Browse files Browse the repository at this point in the history
[OPENSTACK-2949] Get loadbalancers as api dict.
  • Loading branch information
zh805 authored Feb 29, 2024
2 parents 2989f3c + 932ec43 commit 3d85d06
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion f5lbaasdriver/v2/bigip/device_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,11 @@ def load_loadbalancers(self, context, plugin, bindings, device_ids):

filters = {"id": lb_ids}
LOG.debug("before db.get_loadbalancers")
lbs = plugin.db.get_loadbalancers(context, filters=filters)
if hasattr(plugin.db, 'get_loadbalancers_as_api_dict'):
lbs = plugin.db.get_loadbalancers_as_api_dict(context,
filters=filters)
else:
lbs = plugin.db.get_loadbalancers(context, filters=filters)
LOG.debug("after db.get_loadbalancers")

# SDN vendor might modify db interface to return dict instead of
Expand Down

0 comments on commit 3d85d06

Please sign in to comment.