Fix ironic interface get issue
Get ironic interface from interface_network db since the previous api iinterface_get_by_network was removed. Closes-Bug: 1840031 Change-Id: Iecb3e29a656168b391eba145a410e0445e48f1da Signed-off-by: Mingyuan Qi <mingyuan.qi@intel.com>
This commit is contained in:
parent
c0ce04ba16
commit
6ce738bf26
|
@ -108,14 +108,11 @@ class IronicHelm(openstack.OpenstackBaseHelm):
|
||||||
if self.dbapi is None:
|
if self.dbapi is None:
|
||||||
return ironic_port
|
return ironic_port
|
||||||
# find the first interface with ironic network type
|
# find the first interface with ironic network type
|
||||||
networks = self.dbapi.networks_get_by_type(
|
interfaces = self.dbapi.iinterface_get_all()
|
||||||
constants.NETWORK_TYPE_IRONIC)
|
for iface in interfaces:
|
||||||
for network in networks:
|
for net_type in iface.networktypelist:
|
||||||
interface = self.dbapi.iinterface_get_by_network(network.name)
|
if net_type == constants.NETWORK_TYPE_IRONIC:
|
||||||
if interface:
|
ironic_port = self._get_interface_port_name(iface)
|
||||||
# get first interface as ironic port
|
|
||||||
ironic_port = self._get_interface_port_name(interface[0])
|
|
||||||
if ironic_port:
|
|
||||||
break
|
break
|
||||||
return ironic_port
|
return ironic_port
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue