Skip to content

Commit

Permalink
Merge "Return none values for healthmonitor, members and healthmonito…
Browse files Browse the repository at this point in the history
…r status when not present"
  • Loading branch information
Zuul authored and Gerrit Code Review committed Oct 8, 2014
2 parents 60d917c + d9fdd56 commit a6984f9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,20 @@ def make_dict(self, pool, fields=None):
res['vip_id'] = vip_refs[0]['uuid']

# members
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'] = []
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'] = []

return self._fields(res, fields)

def resource_read(self, id):
Expand Down

0 comments on commit a6984f9

Please sign in to comment.