list floating ip api contains port forwarding id
Neutron has added a new extension `floating-ip-port-forwarding-detail`, which defines that when listing floating ip, it returns the port forwardng's id and 'internal_port_id'. This patch updates the list floating ip verification content. [1] https://review.opendev.org/c/openstack/neutron/+/840565 Change-Id: I5a82d745a9bd9d098ddf8902cdd58d1e81bd80ea
This commit is contained in:
parent
a21e219567
commit
bdacaa20ef
@ -128,12 +128,17 @@ class PortForwardingTestJSON(base.BaseNetworkTest):
|
||||
# Check that all PFs are visible in Floating IP details
|
||||
fip = self.client.show_floatingip(fip_id)['floatingip']
|
||||
self.assertEqual(len(created_pfs), len(fip['port_forwardings']))
|
||||
detail_enabled = utils.is_extension_enabled(
|
||||
'floating-ip-port-forwarding-detail', service='network')
|
||||
for pf in created_pfs:
|
||||
expected_pf = {
|
||||
'external_port': pf['external_port'],
|
||||
'internal_port': pf['internal_port'],
|
||||
'protocol': pf['protocol'],
|
||||
'internal_ip_address': pf['internal_ip_address']}
|
||||
if detail_enabled:
|
||||
expected_pf['id'] = pf['id']
|
||||
expected_pf['internal_port_id'] = pf['internal_port_id']
|
||||
self.assertIn(expected_pf, fip['port_forwardings'])
|
||||
|
||||
# Test list of port forwardings
|
||||
@ -164,8 +169,6 @@ class PortForwardingTestJSON(base.BaseNetworkTest):
|
||||
return created_pf
|
||||
|
||||
@decorators.idempotent_id('8202cded-7e82-4420-9585-c091105404f6')
|
||||
@utils.requires_ext(extension="floating-ip-port-forwarding-detail",
|
||||
service="network")
|
||||
def test_associate_2_port_forwardings_to_floating_ip(self):
|
||||
fip = self.create_floatingip()
|
||||
forwardings_data = [(1111, 2222), (3333, 4444)]
|
||||
@ -184,8 +187,6 @@ class PortForwardingTestJSON(base.BaseNetworkTest):
|
||||
self._verify_created_pfs(fip['id'], created_pfs)
|
||||
|
||||
@decorators.idempotent_id('a7e6cc48-8a9b-49be-82fb-cef6f5c29381')
|
||||
@utils.requires_ext(extension="floating-ip-port-forwarding-detail",
|
||||
service="network")
|
||||
def test_associate_port_forwarding_to_2_fixed_ips(self):
|
||||
fip = self.create_floatingip()
|
||||
port = self.create_port(self.network)
|
||||
|
@ -76,6 +76,7 @@
|
||||
- fip-port-details
|
||||
- flavors
|
||||
- floating-ip-port-forwarding
|
||||
- floating-ip-port-forwarding-detail
|
||||
- floatingip-pools
|
||||
- ip-substring-filtering
|
||||
- l3-conntrack-helper
|
||||
|
Loading…
Reference in New Issue
Block a user