Skip to content

Commit

Permalink
Return empty list instead of None for members, monitors and monitors_…
Browse files Browse the repository at this point in the history
…status

Change-Id: Ifca38130382161f9af3f2803f84a386f7678c2ba
  • Loading branch information
rrugge committed Oct 8, 2014
1 parent 68489b7 commit c34e4a0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ def make_dict(self, pool, fields=None):
res['vip_id'] = vip_refs[0]['uuid']

# members
res['members'] = None
res['members'] = []
members = pool.get_loadbalancer_members()
if members is not None:
res['members'] = [member['uuid'] for member in members]

# health_monitors
res['health_monitors'] = None
res['health_monitors'] = []
hm_refs = pool.get_loadbalancer_healthmonitor_refs()
if hm_refs is not None:
res['health_monitors'] = [hm['uuid'] for hm in hm_refs]

# TODO: health_monitor_status
res['health_monitors_status'] = None
res['health_monitors_status'] = []

return self._fields(res, fields)

Expand Down

0 comments on commit c34e4a0

Please sign in to comment.