Skip to content
Snippets Groups Projects
Commit 353e12c0 authored by Lars Seipel's avatar Lars Seipel
Browse files

runner/libvirt: support interfaces attached to libvirt network

This uses a special libvirt_type edge attribute.
parent 956c19b0
No related branches found
No related tags found
No related merge requests found
......@@ -380,6 +380,17 @@ func (r *Runner) buildInventory(t *topology.T) (err error) {
})
continue
}
// When an edge has the libvirt_type attribute set to
// "network", the RHS refers to a libvirt network
// instead of a node in the topology.
if v := l.Attr("libvirt_type"); v == "network" {
from.interfaces = append(from.interfaces, iface{
name: l.FromPort,
mac: mac,
network: l.To,
})
continue
}
toTunnelIP := r.tunnelIP
if to := r.devices[l.To]; to != nil {
toTunnelIP = to.tunnelIP
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment