Lines Matching refs:port
209 """Set up the existing DHCP port, if there is one."""
211 # To avoid pylint thinking that port might be undefined after
213 port = None
215 # Look for an existing DHCP port for this network.
216 for port in network.ports:
217 port_device_id = getattr(port, 'device_id', None)
218 port_device_owner = getattr(port, 'device_owner', None)
222 # If using gateway IPs on this port, we can skip the
225 # port.
227 return port
228 # Otherwise break out, as we now have the DHCP port
235 # on the port.
237 port_subnet_ids = set(ip.subnet_id for ip in port.fixed_ips)
241 # Collect the subnets and fixed IPs that the port already
244 for fixed_ip in port.fixed_ips:
255 # Update the port to have the calculated subnets and fixed
258 port = self.plugin.update_dhcp_port(
259 port.id,
260 {'port': {'network_id': network.id,
262 if not port:
265 return port
269 port = self.setup_dhcp_port(network)
270 self._update_dhcp_port(network, port)
271 interface_name = self.get_interface_name(network, port)
278 port.id, interface_name, port.mac_address,
280 vif_type=getattr(port, 'binding:vif_type',
284 LOG.exception(_LE('Unable to plug DHCP port for '
285 'network %s. Releasing port.'),
287 self.plugin.release_dhcp_port(network.id, port.device_id)
290 for fixed_ip in port.fixed_ips:
301 # IP address to the Linux device for the DHCP port.