Changeset 25
- Timestamp:
- Feb 4, 2008, 2:56:12 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r24 r25 25 25 26 26 my %switch_level = (); 27 my %SWITCH_DB = (); 27 28 LEVEL_OF_EACH_SWITCH: 28 29 for my $sw (@SWITCH){ 29 30 $switch_level{$sw->{hostname}} = $sw->{level} || $DEFAULT{switch_level} || 2; 31 $SWITCH_DB{$sw->{hostname}} = $sw; 30 32 } 31 33 @SWITCH = sort { $switch_level{$b->{hostname}} <=> $switch_level{$a->{hostname}} } @{$KLASK_CFG->{switch}}; … … 960 962 connected_on_port => \%db_switch_connected_on_port, 961 963 link_with => \%db_switch_link_with, 964 switch_db => \%SWITCH_DB, 962 965 }; 963 966 … … 1027 1030 my %db_switch_connected_on_port = %{$switch_connection->{connected_on_port}}; 1028 1031 my %db_switch_link_with = %{$switch_connection->{link_with}}; 1029 1032 my %db_switch_global = %{$switch_connection->{switch_db}}; 1033 1030 1034 my %db_building= (); 1031 1035 for my $sw (@SWITCH) { … … 1060 1064 print "\"$sw:$db_switch_output_port{$sw}\" [label = $db_switch_output_port{$sw}, color = black, fillcolor = lightblue, peripheries = 2, style = filled];\n"; 1061 1065 1062 print "\"$sw\" [label = \"$sw\", color = black, fillcolor = palegreen, shape = rect, style = filled];\n"; 1066 my $swname = $sw; 1067 $swname .= '\n-\n'."$db_switch_global{$sw}->{model}" if exists $db_switch_global{$sw} and exists $db_switch_global{$sw}->{model}; 1068 print "\"$sw\" [label = \"$swname\", color = black, fillcolor = palegreen, shape = rect, style = filled];\n"; 1063 1069 print "\"location$b-$l\" -> \"$sw\" [len = 2, color = firebrick, arrowtail = dot]\n"; 1064 1070 print "\"$sw\" -> \"$sw:$db_switch_output_port{$sw}\" [len=2, style=bold, arrowhead = normal, arrowtail = invdot]\n";
Note: See TracChangeset
for help on using the changeset viewer.