Strip out novaclient extra attributes
Change-Id: Iec82b2d1b2d03ddc47e19646bf13148255d92bc4
This commit is contained in:
parent
76d78507fa
commit
35ab23efc8
@ -1960,7 +1960,9 @@ class OpenStackCloud(_normalize.Normalizer):
|
||||
'Floating IP pools extension is not available on target cloud')
|
||||
|
||||
with _utils.shade_exceptions("Error fetching floating IP pool list"):
|
||||
return self.manager.submit_task(_tasks.FloatingIPPoolList())
|
||||
return [
|
||||
{'name': p['name']} for p in self.manager.submit_task(
|
||||
_tasks.FloatingIPPoolList())]
|
||||
|
||||
def _list_floating_ips(self, filters=None):
|
||||
if self._use_neutron_floating():
|
||||
|
@ -25,13 +25,7 @@ from shade.tests import fakes
|
||||
|
||||
|
||||
class TestFloatingIPPool(base.RequestsMockTestCase):
|
||||
mock_pools = [{
|
||||
'NAME_ATTR': 'name',
|
||||
'name': u'public',
|
||||
'x_openstack_request_ids': [],
|
||||
'request_ids': [],
|
||||
'HUMAN_ID': False,
|
||||
'human_id': None}]
|
||||
pools = [{'name': u'public'}]
|
||||
|
||||
def test_list_floating_ip_pools(self):
|
||||
|
||||
@ -55,7 +49,7 @@ class TestFloatingIPPool(base.RequestsMockTestCase):
|
||||
|
||||
floating_ip_pools = self.cloud.list_floating_ip_pools()
|
||||
|
||||
self.assertItemsEqual(floating_ip_pools, self.mock_pools)
|
||||
self.assertItemsEqual(floating_ip_pools, self.pools)
|
||||
|
||||
self.assert_calls()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user