Merge "Explicitly define the subnet creating a new port"

This commit is contained in:
Zuul 2023-06-26 09:02:49 +00:00 committed by Gerrit Code Review
commit b86ca713f7
1 changed files with 3 additions and 1 deletions

View File

@ -328,7 +328,9 @@ class PortForwardingTestCase(PortForwardingTestCaseBase):
# There is already a port forwarding. We create another port forwarding
# with the new_port, and update the new one with the same params of the
# existing one.
new_port = self._create_port(self.fmt, self.net['id']).json['port']
fixed_ips = [{'subnet_id': self.subnet['id']}]
new_port = self._create_port(self.fmt, self.net['id'],
fixed_ips=fixed_ips).json['port']
self.port_forwarding[apidef.RESOURCE_NAME].update({
'internal_port_id': new_port['id'],
'internal_ip_address': new_port['fixed_ips'][0]['ip_address'],