Commit 33673847 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Bridges have different LINK agent naming.

parent 2198e78b
......@@ -3727,11 +3727,14 @@ sub SetupNetworkAgents($)
foreach my $member ($lan_members->Rows()) {
my $vnode = $member->vnode();
my $vlanname = $member->vname();
my $bridgename = $member->bridge_vname();
my $agentname =
(defined($bridgename) ? $bridgename : $vlanname) . "-${vnode}";
DBQueryFatal("insert into virt_agents ".
" (exptidx, pid, eid, vname, vnode, objecttype) ".
" select '$idx', '$pid', '$eid', ".
" '${vlanname}-${vnode}', '*', ".
" '$agentname', '*', ".
" idx from event_objecttypes where ".
" event_objecttypes.type='LINK'");
......@@ -3759,6 +3762,20 @@ sub SetupNetworkAgents($)
if ($member->protocol() ne "ipv4");
}
#
# Bridges have their own naming; each bridge gets a link agent.
#
my $bridge_members = $virtexp->Table("virt_bridges");
foreach my $member ($bridge_members->Rows()) {
my $bridgename = $member->vname();
DBQueryFatal("replace into virt_agents ".
" (exptidx, pid, eid, vname, vnode, objecttype) ".
" select '$idx', '$pid', '$eid', '$bridgename', '*', ".
" idx from event_objecttypes where ".
" event_objecttypes.type='LINK'");
}
my $lans = $virtexp->Table("virt_lan_lans");
foreach my $lan ($lans->Rows()) {
my $vlanname = $lan->vname();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment