Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/images-openstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ images:
neutron_metadata: "ghcr.io/rackerlabs/understack/neutron:2026.1"
neutron_ovn_metadata: "ghcr.io/rackerlabs/understack/neutron:2026.1"
neutron_openvswitch_agent: "ghcr.io/rackerlabs/understack/neutron:2026.1"
neutron_server: "ghcr.io/rackerlabs/understack/neutron:2026.1"
neutron_server: "ghcr.io/rackerlabs/understack/neutron:pr-2256"
neutron_rpc_server: "ghcr.io/rackerlabs/understack/neutron:2026.1"
neutron_bagpipe_bgp: "ghcr.io/rackerlabs/understack/neutron:2026.1"
neutron_netns_cleanup_cron: "ghcr.io/rackerlabs/understack/neutron:2026.1"
Expand Down
20 changes: 20 additions & 0 deletions python/neutron-understack/neutron_understack/ironic.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,26 @@ def node_by_instance_uuid(self, instance_uuid: str) -> BaremetalNode | None:
except StopIteration:
return None

def attach_vif_to_node(self, node: str | BaremetalNode, vif_id: str) -> None:
"""Attach a Neutron port (VIF) to the node."""
node_id = node.id if isinstance(node, BaremetalNode) else node
LOG.info("Attaching VIF %s to Ironic node %s", vif_id, node_id)
self.irclient.attach_vif_to_node(node, vif_id)

def detach_vif_from_node(self, node: str | BaremetalNode, vif_id: str) -> bool:
"""Detach a VIF from the node.

Returns whatever the SDK reports (False when the VIF was not attached);
``ignore_missing=True`` so tearing down an already-detached VIF is a no-op.
"""
node_id = node.id if isinstance(node, BaremetalNode) else node
LOG.info("Detaching VIF %s from Ironic node %s", vif_id, node_id)
return self.irclient.detach_vif_from_node(node, vif_id, ignore_missing=True)

def node_vif_ids(self, node: str | BaremetalNode) -> list[str]:
"""Return the Neutron port (VIF) ids currently attached to the node."""
return self.irclient.list_node_vifs(node)

def adopt_node_for_router(
self,
node: str | BaremetalNode,
Expand Down
Loading
Loading