passing wrong dict in lbaas

While updating the member and health monitor in lbass,
the resultant dict passing to the constructor is not uniform with the other methods(get and create).

This will cause a KeyError, if we access the dict values.

This patch making the dict uniform with all the methods.

Change-Id: I8b58a0acb4153358b9ed4a46794aaccce181e31b
Closes-Bug: #1438533
This commit is contained in:
Masco Kaliyamoorthy 2015-03-31 12:14:53 +05:30
parent c8f4f5360f
commit e87b191f77
1 changed files with 5 additions and 2 deletions

View File

@ -286,7 +286,9 @@ def _pool_health_monitor_get(request, monitor_id, expand_resource=False):
def pool_health_monitor_update(request, monitor_id, **kwargs):
monitor = neutronclient(request).update_health_monitor(monitor_id, kwargs)
monitor = neutronclient(request
).update_health_monitor(monitor_id, kwargs
).get('health_monitor')
return PoolMonitor(monitor)
@ -341,7 +343,8 @@ def _member_get(request, member_id, expand_pool):
def member_update(request, member_id, **kwargs):
member = neutronclient(request).update_member(member_id, kwargs)
member = neutronclient(request).update_member(member_id, kwargs
).get('member')
return Member(member)