Fix for loadbalancer vips list

Fixes bug 1098165

Change-Id: I86106d39afc9d5d8c6d2d0bbdcd829baf2c1b66b
This commit is contained in:
Ilya Shakhat 2013-01-10 19:51:40 +04:00
parent 9188df4584
commit 7e518630f1
2 changed files with 17 additions and 1 deletions

View File

@ -98,7 +98,7 @@ class LoadBalancerPlugin(loadbalancer_db.LoadBalancerPluginDb):
return res
def get_vips(self, context, filters=None, fields=None):
res = super(LoadBalancerPlugin, self).get_vips_db(
res = super(LoadBalancerPlugin, self).get_vips(
context, filters, fields)
LOG.debug(_("Get vips"))
return res

View File

@ -456,6 +456,22 @@ class TestLoadBalancer(LoadBalancerPluginDbTestCase):
for k, v in keys:
self.assertEqual(res['vip'][k], v)
def test_list_vips(self):
name = "vips_list"
keys = [('name', name),
('subnet_id', self._subnet_id),
('address', "172.16.1.123"),
('port', 80),
('protocol', 'HTTP'),
('connection_limit', -1),
('admin_state_up', True),
('status', 'PENDING_CREATE')]
with self.vip(name=name):
req = self.new_list_request('vips')
res = self.deserialize('json', req.get_response(self.ext_api))
for k, v in keys:
self.assertEqual(res['vips'][0][k], v)
def test_create_pool(self):
name = "pool1"
keys = [('name', name),