Add pools attribute to load balancer heath monitor
The v2 api actually returns pools instead of pool_id in body, but it still uses pool_id in the request. Change-Id: I302537a33c4d48c702066439e566b423896fb70f
This commit is contained in:
parent
eb9d3a5a46
commit
d1b242ee85
|
@ -55,6 +55,9 @@ class HealthMonitor(resource.Resource):
|
|||
name = resource.Body('name')
|
||||
#: Operating status of the member.
|
||||
operating_status = resource.Body('operating_status')
|
||||
#: List of associated pools.
|
||||
#: *Type: list of dicts which contain the pool IDs*
|
||||
pools = resource.Body('pools', type=list)
|
||||
#: The ID of the associated Pool
|
||||
pool_id = resource.Body('pool_id')
|
||||
#: The ID of the project
|
||||
|
|
|
@ -27,6 +27,7 @@ EXAMPLE = {
|
|||
'max_retries_down': 3,
|
||||
'name': 'test_health_monitor',
|
||||
'operating_status': 'ONLINE',
|
||||
'pools': [{'id': uuid.uuid4()}],
|
||||
'pool_id': uuid.uuid4(),
|
||||
'project_id': uuid.uuid4(),
|
||||
'provisioning_status': 'ACTIVE',
|
||||
|
@ -63,6 +64,7 @@ class TestPoolHealthMonitor(testtools.TestCase):
|
|||
self.assertEqual(EXAMPLE['max_retries_down'], test_hm.max_retries_down)
|
||||
self.assertEqual(EXAMPLE['name'], test_hm.name)
|
||||
self.assertEqual(EXAMPLE['operating_status'], test_hm.operating_status)
|
||||
self.assertEqual(EXAMPLE['pools'], test_hm.pools)
|
||||
self.assertEqual(EXAMPLE['pool_id'], test_hm.pool_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], test_hm.project_id)
|
||||
self.assertEqual(EXAMPLE['provisioning_status'],
|
||||
|
|
Loading…
Reference in New Issue