removed ovs node from gui
This commit is contained in:
parent
9c4459e7e7
commit
b0c30056f9
5 changed files with 21 additions and 39 deletions
|
@ -2706,7 +2706,7 @@ proc sendNodeTypeInfo { sock reset } {
|
|||
set typesinuse ""
|
||||
foreach node $node_list {
|
||||
set type [nodeType $node]
|
||||
if { $type != "router" && $type != "OVS" } { continue }
|
||||
if { $type != "router" } { continue }
|
||||
set model [getNodeModel $node]
|
||||
if { [lsearch $typesinuse $model] < 0 } { lappend typesinuse $model }
|
||||
}
|
||||
|
@ -2910,7 +2910,6 @@ proc getNodeTypeAPI { node } {
|
|||
router { return 0x0 }
|
||||
netns { return 0x0 }
|
||||
jail { return 0x0 }
|
||||
OVS { return 0x0 }
|
||||
physical { return 0x1 }
|
||||
tbd { return 0x3 }
|
||||
lanswitch { return 0x4 }
|
||||
|
|
|
@ -333,7 +333,7 @@ proc redrawAll {} {
|
|||
|
||||
proc drawNode { c node } {
|
||||
global showNodeLabels
|
||||
global router pc host lanswitch rj45 hub pseudo OVS
|
||||
global router pc host lanswitch rj45 hub pseudo
|
||||
global curcanvas zoom
|
||||
global wlan
|
||||
if { $c == "" } { set c .c } ;# default canvas
|
||||
|
@ -348,7 +348,7 @@ proc drawNode { c node } {
|
|||
set cimg ""
|
||||
set imgzoom $zoom
|
||||
if { $zoom == 0.75 || $zoom == 1.5 } { set imgzoom 1.0 }
|
||||
if { $type == "router" || $type == "OVS" } {
|
||||
if { $type == "router" } {
|
||||
set model [getNodeModel $node]
|
||||
set cimg [getNodeTypeImage $model normal]
|
||||
}
|
||||
|
@ -1535,7 +1535,7 @@ proc raiseAll {c} {
|
|||
proc button1 { c x y button } {
|
||||
global node_list plot_list curcanvas zoom
|
||||
global activetool activetoolp newlink curobj changed def_router_model
|
||||
global router pc host lanswitch rj45 hub OVS
|
||||
global router pc host lanswitch rj45 hub
|
||||
global oval rectangle text
|
||||
global lastX lastY
|
||||
global background selectbox
|
||||
|
@ -1607,10 +1607,7 @@ proc button1 { c x y button } {
|
|||
rectangle text} $activetool] < 0 } {
|
||||
if { $g_view_locked == 1 } { return }
|
||||
if { $activetoolp == "routers" } {
|
||||
if {$activetool != "OVS"} {
|
||||
set node [newNode router]
|
||||
} else {
|
||||
set node [newNode OVS]}
|
||||
setNodeModel $node $activetool
|
||||
} else {
|
||||
set node [newNode $activetool]
|
||||
|
@ -2550,7 +2547,7 @@ proc popupConfigDialog { c } {
|
|||
-side right -padx 4 -pady 4
|
||||
# end Boeing
|
||||
pack $wi.ftop -side top
|
||||
if { $type == "router" || $type == "OVS"} {
|
||||
if { $type == "router" } {
|
||||
|
||||
ttk::frame $wi.model -borderwidth 4
|
||||
ttk::label $wi.model.label -text "Type:"
|
||||
|
|
|
@ -108,7 +108,7 @@ proc autoIPv4addr { node iface } {
|
|||
|
||||
set peer_node [logicalPeerByIfc $node $iface]
|
||||
# find addresses of NETWORK layer peer nodes
|
||||
if { [[typemodel $peer_node].layer] == "LINK" || [nodeType $peer_node] == "OVS" } {
|
||||
if { [[typemodel $peer_node].layer] == "LINK" } {
|
||||
foreach l2node [listLANnodes $peer_node {}] {
|
||||
foreach ifc [ifcList $l2node] {
|
||||
set peer [logicalPeerByIfc $l2node $ifc]
|
||||
|
|
|
@ -747,15 +747,12 @@ proc newLink { lnode1 lnode2 } {
|
|||
global defLinkColor defLinkWidth
|
||||
global curcanvas
|
||||
global systype
|
||||
if { ([nodeType $lnode1] == "lanswitch" ||[nodeType $lnode1] == "OVS") && \
|
||||
if { [nodeType $lnode1] == "lanswitch" && \
|
||||
[nodeType $lnode2] != "router" && \
|
||||
([nodeType $lnode2] != "lanswitch" || [nodeType $lnode2] != "OVS") } {
|
||||
set regular no }
|
||||
if { ([nodeType $lnode2] == "lanswitch" || [nodeType $lnode2] == "OVS") && \
|
||||
[nodeType $lnode2] != "lanswitch" } { set regular no }
|
||||
if { [nodeType $lnode2] == "lanswitch" && \
|
||||
[nodeType $lnode1] != "router" && \
|
||||
([nodeType $lnode1] != "lanswitch" || [nodeType $lnode1] != "OVS" )} {
|
||||
#Khaled: puts "connecting '$lnode1' (type: '[nodeType $lnode1]') to '$lnode2' (type: '[nodeType $lnode2]') "
|
||||
set regular no }
|
||||
[nodeType $lnode1] != "lanswitch" } { set regular no }
|
||||
if { [nodeType $lnode1] == "hub" && \
|
||||
[nodeType $lnode2] == "hub" } { set regular no }
|
||||
# Boeing: added tunnel, ktunnel types to behave as rj45
|
||||
|
@ -771,7 +768,7 @@ proc newLink { lnode1 lnode2 } {
|
|||
set othernode $lnode1
|
||||
}
|
||||
# only allowed to link with certain types
|
||||
if { [lsearch {router lanswitch hub pc host wlan OVS} \
|
||||
if { [lsearch {router lanswitch hub pc host wlan} \
|
||||
[nodeType $othernode]] < 0} {
|
||||
return
|
||||
}
|
||||
|
@ -836,18 +833,13 @@ proc newLink { lnode1 lnode2 } {
|
|||
} elseif {$delay != ""} {
|
||||
lappend $link "delay $delay"
|
||||
}
|
||||
# Exclude OVS from network layer nodes IP address asignments
|
||||
if { ([[typemodel $lnode2].layer] == "NETWORK") && ([nodeType $lnode2] != "OVS") } {
|
||||
|
||||
#Khaled: puts "Assigning '$lnode2' (type: '[nodeType $lnode2]') an automatic IP address"
|
||||
|
||||
if { [[typemodel $lnode2].layer] == "NETWORK" } {
|
||||
if { $ipv4_addr2 == "" } { autoIPv4addr $lnode2 $ifname2 }
|
||||
if { $ipv6_addr2 == "" } { autoIPv6addr $lnode2 $ifname2 }
|
||||
}
|
||||
# tunnels also excluded from link settings
|
||||
# OVS and Lanswitch should go side by side
|
||||
} elseif { (([nodeType $lnode1] == "lanswitch" || [nodeType $lnode1] == "OVS" )|| \
|
||||
([nodeType $lnode2] == "lanswitch"|| [nodeType $lnode2] == "OVS") || \
|
||||
} elseif { ([nodeType $lnode1] == "lanswitch" || \
|
||||
[nodeType $lnode2] == "lanswitch" || \
|
||||
[string first eth "$ifname1 $ifname2"] != -1) && \
|
||||
[nodeType $lnode1] != "rj45" && [nodeType $lnode2] != "rj45" && \
|
||||
[nodeType $lnode1] != "tunnel" && [nodeType $lnode2] != "tunnel" && \
|
||||
|
@ -859,11 +851,9 @@ proc newLink { lnode1 lnode2 } {
|
|||
}
|
||||
|
||||
lappend link_list $link
|
||||
# Exclude OVS from Network layer node configs
|
||||
if { [nodeType $lnode2] != "pseudo" &&
|
||||
[nodeType $lnode1] != "wlan" &&
|
||||
([[typemodel $lnode1].layer] == "NETWORK" && [nodeType $lnode1] != "OVS") } {
|
||||
|
||||
[[typemodel $lnode1].layer] == "NETWORK" } {
|
||||
if { $ipv4_addr1 == "" && $do_auto_addressing } {
|
||||
autoIPv4addr $lnode1 $ifname1
|
||||
}
|
||||
|
@ -874,8 +864,7 @@ proc newLink { lnode1 lnode2 } {
|
|||
# assume wlan is always lnode1
|
||||
if { [nodeType $lnode1] != "pseudo" &&
|
||||
[nodeType $lnode1] != "wlan" &&
|
||||
([[typemodel $lnode2].layer] == "NETWORK" && [nodeType $lnode2] != "OVS") } {
|
||||
|
||||
[[typemodel $lnode2].layer] == "NETWORK" } {
|
||||
if { $ipv4_addr2 == "" && $do_auto_addressing } {
|
||||
autoIPv4addr $lnode2 $ifname2
|
||||
}
|
||||
|
|
|
@ -21,12 +21,10 @@ array set g_node_types_default {
|
|||
5 {prouter router_green.gif router_green.gif \
|
||||
{zebra OSPFv2 OSPFv3 IPForward} \
|
||||
physical {built-in type for physical nodes}}
|
||||
6 {OVS lanswitch.gif lanswitch.gif {DefaultRoute SSH OvsService} OVS {} }
|
||||
|
||||
}
|
||||
|
||||
# possible machine types for nodes
|
||||
set MACHINE_TYPES "netns physical OVS"
|
||||
set MACHINE_TYPES "netns physical"
|
||||
|
||||
# array populated from nodes.conf file
|
||||
array set g_node_types { }
|
||||
|
@ -184,7 +182,7 @@ proc getNodeTypeServices { type } {
|
|||
# node type from the toolbar
|
||||
proc getNodeTypeMachineType { type } {
|
||||
global MACHINE_TYPES g_node_types
|
||||
set default_machine_type [lindex $MACHINE_TYPES 3]
|
||||
set default_machine_type [lindex $MACHINE_TYPES 0]
|
||||
set i [getNodeTypeIndex $type]
|
||||
if { $i < 0 } { return $default_machine_type }; # failsafe
|
||||
return [lindex $g_node_types($i) 4]
|
||||
|
@ -208,7 +206,7 @@ proc getNodeTypeProfile { type } {
|
|||
# node type from the toolbar
|
||||
proc getNodeTypeMachineType { type } {
|
||||
global MACHINE_TYPES g_node_types
|
||||
set default_machine_type [lindex $MACHINE_TYPES 3]
|
||||
set default_machine_type [lindex $MACHINE_TYPES 0]
|
||||
set i [getNodeTypeIndex $type]
|
||||
if { $i < 0 } { return $default_machine_type }; # failsafe
|
||||
return [lindex $g_node_types($i) 4]
|
||||
|
@ -714,7 +712,6 @@ proc lanswitch.layer {} { return LINK }
|
|||
proc hub.layer {} { return LINK }
|
||||
proc tunnel.layer {} { return LINK }
|
||||
proc wlan.layer {} { return LINK }
|
||||
proc OVS.layer {} { return NETWORK }
|
||||
proc router.layer {} { return NETWORK }
|
||||
proc router.shellcmd { n } { return "vtysh" }
|
||||
|
||||
|
|
Loading…
Reference in a new issue