File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1213,7 +1213,8 @@ def _get_ovn_metadata_port_ip(self, subnet):
1213
1213
m_ports = [port for port in self .network .ports if
1214
1214
self ._is_ovn_metadata_port (port , self .network .id )]
1215
1215
if m_ports :
1216
- for fixed_ip in m_ports [0 ].fixed_ips :
1216
+ port = self .device_manager .plugin .get_dhcp_port (m_ports [0 ].id )
1217
+ for fixed_ip in port .fixed_ips :
1217
1218
if fixed_ip .subnet_id == subnet .id :
1218
1219
return fixed_ip .ip_address
1219
1220
Original file line number Diff line number Diff line change @@ -3205,6 +3205,8 @@ def test__generate_opts_per_subnet_no_metadata(self):
3205
3205
def test__generate_opts_per_subnet_with_metadata_port (self ):
3206
3206
config = {'enable_isolated_metadata' : False ,
3207
3207
'force_metadata' : False }
3208
+ self .mock_mgr .return_value .plugin .get_dhcp_port .return_value = \
3209
+ FakeOvnMetadataPort ()
3208
3210
self ._test__generate_opts_per_subnet_helper (config , True ,
3209
3211
network_class = FakeNetworkDhcpandOvnMetadataPort )
3210
3212
You can’t perform that action at this time.
0 commit comments